summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-25 19:08:45 +0100
committerSteve Block <steveblock@google.com>2011-06-08 13:51:31 +0100
commit2bde8e466a4451c7319e3a072d118917957d6554 (patch)
tree28f4a1b869a513e565c7760d0e6a06e7cf1fe95a /Tools
parent6939c99b71d9372d14a0c74a772108052e8c48c8 (diff)
downloadexternal_webkit-2bde8e466a4451c7319e3a072d118917957d6554.zip
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.gz
external_webkit-2bde8e466a4451c7319e3a072d118917957d6554.tar.bz2
Merge WebKit at r82507: Initial merge by git
Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e
Diffstat (limited to 'Tools')
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/config.json10
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg6
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksLoader.js65
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParser.js40
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js101
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css91
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js202
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js80
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js42
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js67
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html80
-rwxr-xr-xTools/BuildSlaveSupport/build.webkit.org-config/templates/root.html1
-rw-r--r--Tools/BuildSlaveSupport/test-result-archive6
-rwxr-xr-xTools/BuildSlaveSupport/win/kill-old-processes2
-rw-r--r--Tools/ChangeLog2711
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.sln18
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj12
-rw-r--r--Tools/DumpRenderTree/ForwardingHeaders/wtf/OwnArrayPtr.h1
-rw-r--r--Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h1
-rw-r--r--Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h1
-rw-r--r--Tools/DumpRenderTree/LayoutTestController.cpp133
-rw-r--r--Tools/DumpRenderTree/LayoutTestController.h11
-rw-r--r--Tools/DumpRenderTree/StorageTrackerDelegate.h37
-rw-r--r--Tools/DumpRenderTree/StorageTrackerDelegate.mm82
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp16
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h4
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp102
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/mac/Info.plist11
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp3
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc6
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj18
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops11
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops12
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops12
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops12
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops11
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops12
-rw-r--r--Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp9
-rw-r--r--Tools/DumpRenderTree/cg/ImageDiffCG.cpp4
-rw-r--r--Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp5
-rw-r--r--Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h1
-rw-r--r--Tools/DumpRenderTree/chromium/DumpRenderTree.cpp14
-rw-r--r--Tools/DumpRenderTree/chromium/EventSender.cpp4
-rw-r--r--Tools/DumpRenderTree/chromium/LayoutTestController.cpp134
-rw-r--r--Tools/DumpRenderTree/chromium/LayoutTestController.h33
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.cpp21
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.h6
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellWin.cpp51
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.cpp2
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.h1
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.cpp6
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.h13
-rw-r--r--Tools/DumpRenderTree/chromium/config.h3
-rw-r--r--Tools/DumpRenderTree/config.h31
-rw-r--r--Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp3
-rw-r--r--Tools/DumpRenderTree/gtk/DumpRenderTree.cpp49
-rw-r--r--Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp68
-rw-r--r--Tools/DumpRenderTree/mac/Configurations/Base.xcconfig6
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTree.mm9
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTreeMac.h3
-rw-r--r--Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm89
-rw-r--r--Tools/DumpRenderTree/mac/PerlSupport/Makefile2
-rw-r--r--Tools/DumpRenderTree/mac/UIDelegate.h1
-rw-r--r--Tools/DumpRenderTree/mac/UIDelegate.mm10
-rw-r--r--Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm1
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTree.pro2
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp24
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTreeQt.h6
-rw-r--r--Tools/DumpRenderTree/qt/GCControllerQt.cpp2
-rw-r--r--Tools/DumpRenderTree/qt/ImageDiff.pro1
-rw-r--r--Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp51
-rw-r--r--Tools/DumpRenderTree/qt/LayoutTestControllerQt.h11
-rw-r--r--Tools/DumpRenderTree/qt/PlainTextControllerQt.cpp2
-rw-r--r--Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro3
-rw-r--r--Tools/DumpRenderTree/qt/TextInputControllerQt.cpp2
-rw-r--r--Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp13
-rw-r--r--Tools/DumpRenderTree/qt/WorkQueueItemQt.h18
-rw-r--r--Tools/DumpRenderTree/qt/main.cpp89
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTree.vcproj18
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops13
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops14
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops9
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops14
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeRelease.vsprops13
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops16
-rw-r--r--Tools/DumpRenderTree/win/ImageDiff.vcproj14
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffDebug.vsprops11
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops12
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops12
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffProduction.vsprops12
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffRelease.vsprops11
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops12
-rw-r--r--Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp76
-rw-r--r--Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp59
-rw-r--r--Tools/EWebLauncher/main.c2
-rw-r--r--Tools/FindSafari/FindSafari.vcproj16
-rw-r--r--Tools/FindSafari/FindSafariDebug.vsprops11
-rw-r--r--Tools/FindSafari/FindSafariDebugAll.vsprops11
-rw-r--r--Tools/FindSafari/FindSafariDebugCairoCFLite.vsprops12
-rw-r--r--Tools/FindSafari/FindSafariProduction.vsprops12
-rw-r--r--Tools/FindSafari/FindSafariRelease.vsprops11
-rw-r--r--Tools/FindSafari/FindSafariReleaseCairoCFLite.vsprops12
-rw-r--r--Tools/FindSafari/FindSafariReleasePGO.vsprops12
-rw-r--r--Tools/GNUmakefile.am1
-rw-r--r--Tools/MiniBrowser/Configurations/Base.xcconfig13
-rw-r--r--Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops12
-rw-r--r--Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops13
-rw-r--r--Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops13
-rw-r--r--Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops13
-rw-r--r--Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops12
-rw-r--r--Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops13
-rw-r--r--Tools/MiniBrowser/MiniBrowser.vcproj16
-rw-r--r--Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj8
-rw-r--r--Tools/MiniBrowser/mac/BrowserWindowController.m1
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.cpp9
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.h2
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowser.pro2
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowserApplication.cpp4
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowserApplication.h2
-rw-r--r--Tools/QtTestBrowser/QtTestBrowser.pro8
-rw-r--r--Tools/QtTestBrowser/QtTestBrowser.qrc1
-rw-r--r--Tools/QtTestBrowser/favicon.pngbin0 -> 891 bytes
-rw-r--r--Tools/QtTestBrowser/launcherwindow.cpp15
-rw-r--r--Tools/QtTestBrowser/launcherwindow.h12
-rw-r--r--Tools/QtTestBrowser/locationedit.cpp48
-rw-r--r--Tools/QtTestBrowser/locationedit.h6
-rw-r--r--Tools/QtTestBrowser/main.cpp81
-rw-r--r--Tools/QtTestBrowser/mainwindow.cpp27
-rw-r--r--Tools/QtTestBrowser/mainwindow.h3
-rwxr-xr-xTools/Scripts/build-jsc8
-rwxr-xr-xTools/Scripts/build-webkit74
-rwxr-xr-xTools/Scripts/check-inspector-strings14
-rwxr-xr-xTools/Scripts/do-webcore-rename2
-rwxr-xr-xTools/Scripts/extract-localizable-strings14
-rwxr-xr-xTools/Scripts/generate-project-files38
-rwxr-xr-xTools/Scripts/new-run-webkit-httpd6
-rwxr-xr-xTools/Scripts/old-run-webkit-tests36
-rwxr-xr-xTools/Scripts/read-checksum-from-png39
-rw-r--r--Tools/Scripts/run-gtk-tests15
-rwxr-xr-xTools/Scripts/show-pretty-diff77
-rwxr-xr-xTools/Scripts/update-webkit8
-rwxr-xr-xTools/Scripts/update-webkit-localizable-strings15
-rw-r--r--Tools/Scripts/webkitdirs.pm258
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/api.py6
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/changelog.py4
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm.py22
-rw-r--r--Tools/Scripts/webkitpy/common/config/build.py20
-rw-r--r--Tools/Scripts/webkitpy/common/config/build_unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/common/config/committers.py9
-rw-r--r--Tools/Scripts/webkitpy/common/config/ports.py25
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/__init__.py2
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py24
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py29
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py20
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py59
-rwxr-xr-xTools/Scripts/webkitpy/common/system/autoinstall.py4
-rw-r--r--Tools/Scripts/webkitpy/common/system/filesystem.py3
-rw-r--r--Tools/Scripts/webkitpy/common/system/filesystem_mock.py30
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py114
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py77
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py23
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py5
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/base.py47
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py5
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py40
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/dryrun.py20
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/http_server.py13
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/mac.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py3
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/test.py36
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/test_files.py5
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png.py40
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png_unittest.py44
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py271
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py14
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py77
-rw-r--r--Tools/Scripts/webkitpy/style/checker.py21
-rwxr-xr-xTools/Scripts/webkitpy/style/checker_unittest.py31
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/changelog.py74
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py155
-rw-r--r--Tools/Scripts/webkitpy/style/error_handlers.py10
-rw-r--r--Tools/Scripts/webkitpy/test/cat.py2
-rw-r--r--Tools/Scripts/webkitpy/test/echo.py2
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/__init__.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py13
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queues_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/upload.py21
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/upload_unittest.py19
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/__init__.py1
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/abstractstep.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/attachtobug.py51
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/commit.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/options.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/preparechangelog.py2
-rw-r--r--Tools/TestResultServer/handlers/dashboardhandler.py10
-rw-r--r--Tools/TestWebKitAPI/Configurations/Base.xcconfig13
-rw-r--r--Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig3
-rw-r--r--Tools/TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops11
-rw-r--r--Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebug.vsprops2
-rw-r--r--Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugAll.vsprops2
-rw-r--r--Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugCairoCFLite.vsprops2
-rw-r--r--Tools/TestWebKitAPI/Configurations/TestWebKitAPIRelease.vsprops2
-rw-r--r--Tools/TestWebKitAPI/PlatformUtilities.h1
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj20
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPIPrefix.h4
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp60
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp72
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp66
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp88
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/SendingMessagesToTheWebProcessBeforeItIsValid.cpp42
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp41
-rw-r--r--Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm8
-rw-r--r--Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp14
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPI.sln14
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj42
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj2
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj6
-rw-r--r--Tools/WebKitAPITest/HostWindow.cpp1
-rw-r--r--Tools/WebKitAPITest/TestsController.cpp1
-rw-r--r--Tools/WebKitAPITest/WebKitAPITest.vcproj14
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestDebug.vsprops11
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestDebugAll.vsprops12
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestDebugCairoCFLite.vsprops12
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestProduction.vsprops12
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestRelease.vsprops11
-rw-r--r--Tools/WebKitAPITest/WebKitAPITestReleaseCairoCFLite.vsprops12
-rw-r--r--Tools/WebKitAPITest/config.h57
-rw-r--r--Tools/WebKitAPITest/main.cpp2
-rw-r--r--Tools/WebKitAPITest/tests/WebViewDestruction.cpp2
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj14
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops11
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops12
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops12
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinProduction.vsprops12
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops11
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops12
-rw-r--r--Tools/WebKitTestRunner/Configurations/Base.xcconfig13
-rw-r--r--Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig2
-rw-r--r--Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops11
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/GCController.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp14
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h8
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp30
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp6
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp14
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp1
-rw-r--r--Tools/WebKitTestRunner/StringFunctions.h20
-rw-r--r--Tools/WebKitTestRunner/TestController.cpp5
-rw-r--r--Tools/WebKitTestRunner/TestInvocation.cpp17
-rw-r--r--Tools/WebKitTestRunner/TestInvocation.h2
-rw-r--r--Tools/WebKitTestRunner/WebKitTestRunner.sln26
-rw-r--r--Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj24
-rw-r--r--Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp38
-rw-r--r--Tools/WebKitTestRunner/cg/TestInvocationCG.cpp (renamed from Tools/WebKitTestRunner/mac/TestInvocationMac.mm)60
-rw-r--r--Tools/WebKitTestRunner/config.h68
-rw-r--r--Tools/WebKitTestRunner/mac/TestControllerMac.mm9
-rw-r--r--Tools/WebKitTestRunner/mac/main.mm2
-rw-r--r--Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp2
-rw-r--r--Tools/WebKitTestRunner/qt/TestControllerQt.cpp1
-rw-r--r--Tools/WebKitTestRunner/qt/TestInvocationQt.cpp3
-rw-r--r--Tools/WebKitTestRunner/qt/WebKitTestRunner.pro1
-rw-r--r--Tools/WebKitTestRunner/qt/main.cpp2
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundle.vcproj14
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundleDebug.vsprops12
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundleDebugAll.vsprops13
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundleDebugCairoCFLite.vsprops13
-rwxr-xr-xTools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj2
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundleProduction.vsprops13
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundleRelease.vsprops12
-rw-r--r--Tools/WebKitTestRunner/win/InjectedBundleReleaseCairoCFLite.vsprops13
-rw-r--r--Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp1
-rw-r--r--Tools/WebKitTestRunner/win/TestControllerWin.cpp1
-rw-r--r--Tools/WebKitTestRunner/win/TestInvocationWin.cpp5
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunner.vcproj78
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerDebug.vsprops13
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerDebugAll.vsprops14
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerDebugCairoCFLite.vsprops13
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerProduction.vsprops14
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerRelease.vsprops13
-rw-r--r--Tools/WebKitTestRunner/win/WebKitTestRunnerReleaseCairoCFLite.vsprops13
-rw-r--r--Tools/WebKitTestRunner/win/main.cpp2
-rw-r--r--Tools/WinLauncher/WinLauncher.vcproj16
-rw-r--r--Tools/WinLauncher/WinLauncherDebug.vsprops11
-rw-r--r--Tools/WinLauncher/WinLauncherDebugAll.vsprops12
-rw-r--r--Tools/WinLauncher/WinLauncherDebugCairoCFLite.vsprops12
-rw-r--r--Tools/WinLauncher/WinLauncherProduction.vsprops12
-rw-r--r--Tools/WinLauncher/WinLauncherRelease.vsprops11
-rw-r--r--Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops12
-rw-r--r--Tools/record-memory-win/record-memory-win.vcproj14
-rw-r--r--Tools/record-memory-win/record-memory-winDebug.vsprops11
-rw-r--r--Tools/record-memory-win/record-memory-winDebugAll.vsprops12
-rw-r--r--Tools/record-memory-win/record-memory-winDebugCairoCFLite.vsprops12
-rw-r--r--Tools/record-memory-win/record-memory-winProduction.vsprops12
-rw-r--r--Tools/record-memory-win/record-memory-winRelease.vsprops11
-rw-r--r--Tools/record-memory-win/record-memory-winReleaseCairoCFLite.vsprops12
-rw-r--r--Tools/wx/build/settings.py30
-rw-r--r--Tools/wx/build/waf_extensions.py19
309 files changed, 8423 insertions, 911 deletions
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/config.json b/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
index 09953ab..28ff304 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
@@ -219,15 +219,19 @@
],
"schedulers": [ { "type": "AnyBranchScheduler", "name": "trunk", "change_filter": "trunk_filter", "treeStableTimer": 45.0,
- "builderNames": ["Leopard Intel Release (Build)", "Leopard Intel Debug (Build)",
- "SnowLeopard Intel Release (Build)", "SnowLeopard Intel Leaks",
- "GTK Linux 32-bit Release", "GTK Linux 32-bit Debug", "GTK Linux 64-bit Debug",
+ "builderNames": ["GTK Linux 32-bit Release", "GTK Linux 32-bit Debug", "GTK Linux 64-bit Debug",
"Qt Linux Release", "Qt Linux Release minimal", "Qt Linux ARMv7 Release",
"Qt Windows 32-bit Release", "Qt Windows 32-bit Debug",
"Chromium Win Release", "Chromium Mac Release", "Chromium Linux Release",
"Chromium Win Release (Tests)", "Chromium Mac Release (Tests)", "Chromium Linux Release (Tests)",
"WinCairo Debug (Build)", "WinCE Release (Build)", "EFL Linux Release (Build)"]
},
+ { "type": "PlatformSpecificScheduler", "platform": "mac-leopard", "branch": "trunk", "treeStableTimer": 45.0,
+ "builderNames": ["Leopard Intel Release (Build)", "Leopard Intel Debug (Build)"]
+ },
+ { "type": "PlatformSpecificScheduler", "platform": "mac-snowleopard", "branch": "trunk", "treeStableTimer": 45.0,
+ "builderNames": ["SnowLeopard Intel Release (Build)", "SnowLeopard Intel Leaks"]
+ },
{ "type": "PlatformSpecificScheduler", "platform": "win", "branch": "trunk", "treeStableTimer": 45.0,
"builderNames": ["Windows Release (Build)", "Windows Debug (Build)"]
},
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
index 7913095..1beee38 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -145,7 +145,7 @@ class RunJavaScriptCoreTests(shell.Test):
description = ["jscore-tests running"]
descriptionDone = ["jscore-tests"]
command = ["perl", "./Tools/Scripts/run-javascriptcore-tests", WithProperties("--%(configuration)s")]
- logfiles = {'results': 'Source/JavaScriptCore/tests/mozilla/actual.html'}
+ logfiles = {'actual.html (source)': 'Source/JavaScriptCore/tests/mozilla/actual.html'}
def __init__(self, skipBuild=False, *args, **kwargs):
self.skipBuild = skipBuild
@@ -168,6 +168,9 @@ class RunJavaScriptCoreTests(shell.Test):
else:
self.regressionLine = None
+ if 'actual.html (source)' in cmd.logs:
+ self.addHTMLLog('actual.html', cmd.logs['actual.html (source)'].getText())
+
def evaluateCommand(self, cmd):
if self.regressionLine:
return FAILURE
@@ -360,6 +363,7 @@ class RunQtAPITests(shell.Test):
return [self.name]
class RunWebKitLeakTests(RunWebKitTests):
+ warnOnWarnings = True
def start(self):
self.setCommand(self.command + ["--leaks"])
return RunWebKitTests.start(self)
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksLoader.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksLoader.js
new file mode 100644
index 0000000..e559e73
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksLoader.js
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+function LeaksLoader(didCountLeaksFilesCallback, didLoadLeaksFileCallback) {
+ this._didCountLeaksFilesCallback = didCountLeaksFilesCallback;
+ this._didLoadLeaksFileCallback = didLoadLeaksFileCallback;
+}
+
+LeaksLoader.prototype = {
+ start: function(url) {
+ if (/\.txt$/.test(url))
+ this._loadLeaksFiles([url]);
+ else
+ this._loadLeaksFromResultsPage(url);
+ },
+
+ _loadLeaksFiles: function(urls) {
+ this._didCountLeaksFilesCallback(urls.length);
+
+ var self = this;
+ var pendingURLs = urls.length;
+ urls.forEach(function(url) {
+ getResource(url, function(xhr) {
+ self._didLoadLeaksFileCallback(xhr.responseText);
+ });
+ });
+ },
+
+ _loadLeaksFromResultsPage: function(url) {
+ var self = this;
+ getResource(url, function(xhr) {
+ var root = document.createElement("html");
+ root.innerHTML = xhr.responseText;
+
+ // Strip off everything after the last /.
+ var baseURL = url.substring(0, url.lastIndexOf("/") + 1);
+
+ var urls = Array.prototype.map.call(root.querySelectorAll("tr.file > td > a[href$='-leaks.txt']"), function(link) { return baseURL + link.getAttribute("href"); });
+
+ self._loadLeaksFiles(urls);
+ });
+ },
+};
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParser.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParser.js
new file mode 100644
index 0000000..bcd3800
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParser.js
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+function LeaksParser(didParseLeaksFileCallback) {
+ this._didParseLeaksFileCallback = didParseLeaksFileCallback;
+ this._worker = new Worker("LeaksParserWorker.js");
+
+ var self = this;
+ this._worker.onmessage = function(e) {
+ self._didParseLeaksFileCallback(e.data);
+ };
+}
+
+LeaksParser.prototype = {
+ addLeaksFile: function(leaksText) {
+ this._worker.postMessage(leaksText);
+ },
+};
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js
new file mode 100644
index 0000000..c425b15
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js
@@ -0,0 +1,101 @@
+/*
+ * 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.
+ */
+
+function LeaksParserWorker() {
+ this.profile = this._createNode("top level");
+}
+
+LeaksParserWorker.prototype = {
+ addLeaksFile: function(leaksText) {
+ this._incorporateLeaks(this._parseLeaks(leaksText));
+ },
+
+ _parseLeaks: function(text) {
+ var leaks = [];
+ var currentSize = 0;
+ text.split("\n").forEach(function(line) {
+ var match = /^Leak:.*\ssize=(\d+)\s/.exec(line);
+ if (match) {
+ currentSize = parseInt(match[1], 10);
+ return;
+ }
+ if (!/^\s+Call stack:/.test(line))
+ return;
+
+ // The first frame is not really a frame at all ("Call stack: thread 0xNNNNN:"), so we omit it.
+ leaks.push({ size: currentSize, stack: line.split(" | ").slice(1).map(function(str) { return str.trim(); }) });
+ currentSize = 0;
+ });
+ return leaks;
+ },
+
+ _createNode: function(functionName) {
+ return {
+ functionName: functionName,
+ selfTime: 0,
+ totalTime: 0,
+ averageTime: 0,
+ numberOfCalls: 0,
+ children: [],
+ childrenByName: {},
+ callUID: functionName,
+ };
+ },
+
+ // This function creates a fake "profile" from a set of leak stacks. "selfTime" is the number of
+ // stacks in which this function was at the top (in theory, only functions like malloc should have a
+ // non-zero selfTime). "totalTime" is the number of stacks which contain this function (and thus is
+ // the number of leaks that occurred in or beneath this function).
+ // FIXME: This is expensive! Can we parallelize it?
+ _incorporateLeaks: function(leaks) {
+ var self = this;
+ leaks.forEach(function(leak) {
+ leak.stack.reduce(function(node, frame, index, array) {
+ var childNode;
+ if (frame in node.childrenByName)
+ childNode = node.childrenByName[frame];
+ else {
+ childNode = self._createNode(frame);
+ childNode.head = self.profile;
+ node.childrenByName[frame] = childNode;
+ node.children.push(childNode);
+ }
+ if (index === array.length - 1)
+ childNode.selfTime += leak.size;
+ childNode.totalTime += leak.size;
+ ++childNode.numberOfCalls;
+ return childNode;
+ }, self.profile);
+ });
+ self.profile.totalTime = self.profile.children.reduce(function(sum, child) { return sum + child.totalTime; }, 0);
+ },
+};
+
+var parser = new LeaksParserWorker();
+
+onmessage = function(e) {
+ parser.addLeaksFile(e.data);
+ postMessage(parser.profile);
+}
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css
new file mode 100644
index 0000000..76d71a8
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ */
+
+#url-prompt-container {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 50000;
+}
+
+#url-prompt {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ width: 400px;
+ height: 300px;
+ margin: auto;
+ background-color: white;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.8);
+ padding: 50px 0;
+ text-align: center;
+}
+
+#loading-indicator {
+ position: absolute;
+ right: 20px;
+ width: 150px;
+ margin-top: 5px;
+}
+
+#spinner {
+ float: left;
+ margin-top: -1px;
+}
+
+#loading-indicator-label {
+ margin-left: 5px;
+}
+
+#recent-builds-loading-indicator {
+ color: gray;
+}
+
+#recent-builds-list {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+/* Inspector style overrides */
+
+.percent-time-status-bar-item {
+ /* We always show leak counts as real values, not percentages, so this button isn't useful. */
+ display: none !important;
+}
+
+.data-grid .data-container {
+ overflow-x: visible;
+ overflow-y: auto;
+}
+
+.data-grid td > div, .data-grid th > div {
+ overflow: visible;
+}
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js
new file mode 100644
index 0000000..bd83f1a
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js
@@ -0,0 +1,202 @@
+/*
+ * 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.
+ */
+
+var LeaksViewer = {
+ loaded: function() {
+ this._loader = new LeaksLoader(this._didCountLeaksFiles.bind(this), this._didLoadLeaksFile.bind(this));
+ this._parser = new LeaksParser(this._didParseLeaksFile.bind(this));
+
+ this._loadingIndicator = document.getElementById("loading-indicator");
+ this._loadingIndicatorLabel = document.getElementById("loading-indicator-label");
+
+ this._profileView = new WebInspector.CPUProfileView({});
+ document.getElementById("main-panels").appendChild(this._profileView.element);
+ this._profileView.show();
+
+ // From WebInspector.Panel.prototype.show
+ var statusBarItems = this._profileView.statusBarItems;
+ if (statusBarItems) {
+ this._statusBarItemContainer = document.createElement("div");
+ for (var i = 0; i < statusBarItems.length; ++i)
+ this._statusBarItemContainer.appendChild(statusBarItems[i]);
+ document.getElementById("main-status-bar").appendChild(this._statusBarItemContainer);
+ }
+
+ var url;
+ var match = /url=([^&]+)/.exec(location.search);
+ if (match)
+ url = decodeURIComponent(match[1]);
+
+ if (url)
+ this._loadLeaksFromURL(url)
+ else
+ this._displayURLPrompt();
+ },
+
+ get filesLeftToParse() {
+ if (!('_filesLeftToParse' in this))
+ this._filesLeftToParse = 0;
+ return this._filesLeftToParse;
+ },
+
+ set filesLeftToParse(x) {
+ if (this._filesLeftToParse === x)
+ return;
+ this._filesLeftToParse = x;
+ this._loadingStatusChanged();
+ },
+
+ get loading() {
+ return this._isLoading;
+ },
+
+ set loading(x) {
+ if (this._isLoading === x)
+ return;
+ this._isLoading = x;
+ this._loadingStatusChanged();
+ },
+
+ get url() {
+ return this._url;
+ },
+
+ set url(x) {
+ if (this._url === x)
+ return;
+
+ this._url = x;
+ this._updateTitle();
+ },
+
+ urlPromptButtonClicked: function(e) {
+ this._urlChosenFromPrompt(document.getElementById("url").value);
+ },
+
+ _didCountLeaksFiles: function(fileCount) {
+ this._fileCount = fileCount;
+ this.filesLeftToParse = fileCount;
+ },
+
+ _didLoadLeaksFile: function(leaksText) {
+ this._parser.addLeaksFile(leaksText);
+ },
+
+ _didLoadRecentBuilds: function(builds) {
+ this._recentBuilds = builds;
+ this._updateURLPrompt();
+ },
+
+ _didParseLeaksFile: function(profile) {
+ if (--this.filesLeftToParse)
+ return;
+ ProfilerAgent.profileReady(profile);
+ this.loading = false;
+ },
+
+ _displayURLPrompt: function() {
+ document.getElementById("url-prompt-container").removeStyleClass("hidden");
+ document.getElementById("url").focus();
+ var loader = new RecentBuildsLoader(this._didLoadRecentBuilds.bind(this));
+ loader.start("SnowLeopard Intel Leaks", this._numberOfRecentBuildsToLoad);
+ },
+
+ _loadLeaksFromURL: function(url) {
+ this.url = url;
+ this.loading = true;
+
+ this._loader.start(this.url);
+ },
+
+ _loadingIndicatorText: function() {
+ var text = "Loading";
+ if (this.filesLeftToParse)
+ text += " " + (this._fileCount - this.filesLeftToParse + 1) + "/" + this._fileCount + " files";
+ text += "\u2026";
+ return text;
+ },
+
+ _loadingStatusChanged: function() {
+ this._setLoadingIndicatorHidden(!this.loading);
+ this._updateLoadingIndicatorLabel();
+ this._updateTitle();
+ },
+
+ _numberOfRecentBuildsToLoad: 10,
+
+ _setLoadingIndicatorHidden: function(hidden) {
+ if (hidden)
+ this._loadingIndicator.addStyleClass("hidden");
+ else
+ this._loadingIndicator.removeStyleClass("hidden");
+ },
+
+ _updateLoadingIndicatorLabel: function() {
+ this._loadingIndicatorLabel.innerText = this._loadingIndicatorText();
+ },
+
+ _updateTitle: function() {
+ var title = "Leaks Viewer \u2014 ";
+ if (this.loading)
+ title += "(" + this._loadingIndicatorText() + ") ";
+ title += this.url;
+ document.title = title;
+ },
+
+ _updateURLPrompt: function() {
+ var recentBuildsContainer = document.getElementById("recent-builds-container");
+ recentBuildsContainer.removeChildren();
+ if (this._recentBuilds && this._recentBuilds.length) {
+ var list = document.createElement("ol");
+ list.id = "recent-builds-list";
+
+ var self = this;
+ this._recentBuilds.forEach(function(build) {
+ var link = document.createElement("a");
+ link.href = document.location.href + "?url=" + encodeURIComponent(build.url);
+ link.addEventListener("click", function(e) {
+ self._urlChosenFromPrompt(build.url);
+ e.preventDefault();
+ });
+ link.appendChild(document.createTextNode("r" + build.revision + ": " + build.leakCount + " leaks"));
+ var item = document.createElement("li");
+ item.appendChild(link);
+
+ list.appendChild(item);
+ });
+
+ recentBuildsContainer.appendChild(list);
+ } else
+ recentBuildsContainer.appendChild(document.createTextNode("No recent leaky builds found."));
+ },
+
+ _urlChosenFromPrompt: function(url) {
+ this._loadLeaksFromURL(url);
+ document.getElementById("url-prompt-container").addStyleClass("hidden");
+ },
+
+};
+
+addEventListener("load", LeaksViewer.loaded.bind(LeaksViewer));
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js
new file mode 100644
index 0000000..c15aef2
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+
+function RecentBuildsLoader(didLoadRecentBuildsCallback) {
+ this._didLoadRecentBuildsCallback = didLoadRecentBuildsCallback;
+}
+
+RecentBuildsLoader.prototype = {
+ start: function(builderName, maximumNumberOfBuilds) {
+ var url = this._buildbotBaseURL + "/json/builders/" + builderName + "/builds/?";
+ url += range(maximumNumberOfBuilds).map(function(n) { return "select=-" + (n + 1); }).join("&");
+ var self = this;
+ getResource(url, function(xhr) {
+ var data = JSON.parse(xhr.responseText);
+ var builds = [];
+ Object.keys(data).forEach(function(buildNumber) {
+ var build = data[buildNumber];
+
+ var buildInfo = {
+ revision: build.sourceStamp.changes[0].rev,
+ leakCount: 0,
+ url: null,
+ };
+ for (var stepIndex = 0; stepIndex < build.steps.length; ++stepIndex) {
+ var step = build.steps[stepIndex];
+ if (step.name === "layout-test") {
+ if (!("text" in step))
+ continue;
+ var strings = step.text;
+ for (var stringIndex = 0; stringIndex < strings.length; ++stringIndex) {
+ var match = /^(\d+) total leaks found!$/.exec(strings[stringIndex]);
+ if (!match)
+ continue;
+ buildInfo.leakCount = parseInt(match[1], 10);
+ break;
+ }
+ } else if (step.name === "MasterShellCommand") {
+ if (!("urls" in step))
+ return;
+ if (!("view results" in step.urls))
+ return;
+ buildInfo.url = self._buildbotBaseURL + step.urls["view results"] + "/";
+ }
+
+ if (buildInfo.leakCount && buildInfo.url) {
+ builds.push(buildInfo);
+ break;
+ }
+ }
+ });
+ // Sort descending by revision.
+ builds.sort(function(a, b) { return b.revision - a.revision; });
+ self._didLoadRecentBuildsCallback(builds);
+ });
+ },
+
+ _buildbotBaseURL: "http://build.webkit.org/",
+};
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js
new file mode 100644
index 0000000..c44848a
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+function getResource(url, callback) {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function() {
+ // Allow a status of 0 for easier testing with local files.
+ if (this.readyState == 4 && (!this.status || this.status == 200))
+ callback(this);
+ };
+ xhr.open("GET", url);
+ xhr.send();
+}
+
+function range(n) {
+ var result = new Array(n);
+ for (var i = 0; i < n; ++i)
+ result[i] = i;
+ return result;
+}
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js
new file mode 100644
index 0000000..b948f12
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ */
+
+// This file contains definitions that are needed to satisfy the Web Inspector JavaScript files we
+// import.
+
+var WebInspector = {
+ UIString: function(string) {
+ return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));
+ },
+};
+
+var Preferences = {
+ // Setting this to false causes the "Average" and "Calls" columns to be shown.
+ samplingCPUProfiler: false,
+};
+
+var ProfilerAgent = {
+ getProfile: function(typeId, uid, callback) {
+ this._callback = callback;
+ },
+
+ profileReady: function(head) {
+ this._callback({ head: head });
+ },
+};
+
+// This function makes any required changes to objects imported from the Web Inspector JavaScript
+// files.
+function monkeyPatchInspectorObjects() {
+ var originalGetter = WebInspector.ProfileDataGridNode.prototype.__lookupGetter__("data");
+ WebInspector.ProfileDataGridNode.prototype.__defineGetter__("data", function() {
+ var data = originalGetter.call(this);
+
+ // ProfileDataGridNode formats values as milliseconds, but we are instead measuring bytes.
+ if (!this.profileView.showSelfTimeAsPercent)
+ data.self = Number.bytesToString(this.selfTime);
+ if (!this.profileView.showTotalTimeAsPercent)
+ data.total = Number.bytesToString(this.totalTime);
+ if (!this.profileView.showAverageTimeAsPercent)
+ data.average = Number.bytesToString(this.averageTime);
+
+ return data;
+ });
+}
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html
new file mode 100644
index 0000000..3c185bc
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html
@@ -0,0 +1,80 @@
+<!--
+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.
+-->
+
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Leaks Viewer</title>
+ <link rel=stylesheet href="http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/inspector/front-end/inspector.css?p=80565">
+ <link rel=stylesheet href=LeaksViewer.css>
+
+ <script src=WebInspectorShims.js></script>
+
+ <!-- The order here matches inspector.html. -->
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/utilities.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/treeoutline.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/Object.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/View.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/Panel.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/DataGrid.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/SidebarTreeElement.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/StatusBarButton.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/ProfileDataGridTree.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/BottomUpProfileDataGridTree.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/TopDownProfileDataGridTree.js"></script>
+ <script src="http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/ProfileView.js"></script>
+
+ <script>
+ // Now that all the Inspector files have loaded we can apply our monkey patches.
+ monkeyPatchInspectorObjects();
+ </script>
+
+ <script src=LeaksLoader.js></script>
+ <script src=LeaksParser.js></script>
+ <script src=LeaksViewer.js></script>
+ <script src=RecentBuildsLoader.js></script>
+ <script src=Utilities.js></script>
+</head>
+<body>
+ <div id=main-panels></div>
+ <div id=main-status-bar class=status-bar>
+ <div id=loading-indicator class=hidden>
+ <img id=spinner src=http://svn.webkit.org/repository/webkit/!svn/bc/80565/trunk/Source/WebCore/inspector/front-end/Images/spinner.gif>
+ <span id=loading-indicator-label>Loading&hellip;</span>
+ </div>
+ </div>
+ <div id=url-prompt-container class=hidden>
+ <div id=url-prompt>
+ <p>Enter the URL of a build results page or leaks file:</p>
+ <input id=url type=url><button onclick='LeaksViewer.urlPromptButtonClicked(event)'>Fetch leaks</button>
+ <p>Or choose a recent build:</p>
+ <div id=recent-builds-container>
+ <p id=recent-builds-loading-indicator>Loading builds&hellip;</p>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html b/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
index c6d2343..88f2e10 100755
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
@@ -19,6 +19,7 @@
<li><a href="http://webkit-commit-queue.appspot.com/">Commit Queue Status</a> information.</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>
</ul>
</body> </html>
diff --git a/Tools/BuildSlaveSupport/test-result-archive b/Tools/BuildSlaveSupport/test-result-archive
index a4d3ca3..b34e04a 100644
--- a/Tools/BuildSlaveSupport/test-result-archive
+++ b/Tools/BuildSlaveSupport/test-result-archive
@@ -90,7 +90,11 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir):
# deleting its contents, claiming "Directory not empty".
# We can safely ignore this since it was the directory contents that
# we are most interested in deleting.
- if e.errno != 90:
+ # Python in Cygwin will also sometimes throw errno 2 if a process is
+ # holding a file open. There's no point in failing to create the
+ # archive just because some other process is behaving badly. See
+ # <http://webkit.org/b/55581>.
+ if e.errno != 90 and e.errno != 2:
raise
def zipFilesRecursively(archiveFile, files):
diff --git a/Tools/BuildSlaveSupport/win/kill-old-processes b/Tools/BuildSlaveSupport/win/kill-old-processes
index 885d6fa..f7f4423 100755
--- a/Tools/BuildSlaveSupport/win/kill-old-processes
+++ b/Tools/BuildSlaveSupport/win/kill-old-processes
@@ -30,7 +30,7 @@ def main():
"svn.exe", "httpd.exe", "cl.exe", "link.exe", "midl.exe", "devenv.exe", "perl.exe",
"imagediff.exe", "imagediff_debug.exe", "jsc.exe", "jsc_debug.exe", "WebKit2WebProcess.exe",
"WebKit2WebProcess_debug.exe", "WebKitTestRunner.exe", "WebKitTestRunner_debug.exe",
- "wdiff.exe"]
+ "wdiff.exe", "LightTPD.exe"]
for task in tasksToKill:
os.system("taskkill /f /im " + task)
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index caccb04..479fd41 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,2714 @@
+2011-03-30 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Update Windows production build logic for new production configurations
+ https://bugs.webkit.org/show_bug.cgi?id=57494
+
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops:
+ * DumpRenderTree/win/DumpRenderTreeProduction.vsprops:
+ * DumpRenderTree/win/ImageDiffProduction.vsprops:
+ * FindSafari/FindSafariProduction.vsprops:
+ * FindSafari/FindSafariReleasePGO.vsprops:
+ * MiniBrowser/Configurations/MiniBrowserProduction.vsprops:
+ * WebKitAPITest/WebKitAPITestProduction.vsprops:
+ * WebKitLauncherWin/WebKitLauncherWinProduction.vsprops:
+ * WebKitTestRunner/win/InjectedBundleProduction.vsprops:
+ * WebKitTestRunner/win/WebKitTestRunnerProduction.vsprops:
+ * WinLauncher/WinLauncherProduction.vsprops:
+ * record-memory-win/record-memory-winProduction.vsprops:
+
+2011-03-30 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Fix LoadHTMLStringItem::invoke() after r75966
+ Unskip http/tests/navigation/go-back-to-error-page.html
+
+ Also add the location of DumpRenderTreeSupportQt.h
+ to DRT's include paths.
+
+ https://bugs.webkit.org/show_bug.cgi?id=52614
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ * DumpRenderTree/qt/GCControllerQt.cpp:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::queueLoadHTMLString):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/qt/PlainTextControllerQt.cpp:
+ * DumpRenderTree/qt/TextInputControllerQt.cpp:
+ * DumpRenderTree/qt/WorkQueueItemQt.cpp:
+ (LoadAlternateHTMLStringItem::invoke):
+ * DumpRenderTree/qt/WorkQueueItemQt.h:
+ (LoadAlternateHTMLStringItem::LoadAlternateHTMLStringItem):
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/launcherwindow.h:
+
+2011-03-30 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ SheriffBot rollouts take too long
+ https://bugs.webkit.org/show_bug.cgi?id=57498
+
+ We used to build before landing rollouts via the commit-queue to
+ prevent further breakage, but now that our individual commit-queue
+ machines are slower, building takes too long. I can't remember the
+ last time a rollout broke compile. It seems like just landing the
+ patch is the better trade-off.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
+2011-03-30 Adam Barth <abarth@webkit.org>
+
+ Remove platform/chromium-mac-snowleopard
+ https://bugs.webkit.org/show_bug.cgi?id=57486
+
+ This directory no longer exists, so we can remove it from the fallback
+ chain.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+
+2011-03-30 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Rename Windows configuration Release_LTCG to Production for clarity
+ https://bugs.webkit.org/show_bug.cgi?id=57465
+
+ * DumpRenderTree/DumpRenderTree.sln:
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops: Copied from Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseLTCG.vsprops.
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseLTCG.vsprops: Removed.
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/DumpRenderTreeProduction.vsprops: Copied from Tools/DumpRenderTree/win/DumpRenderTreeReleaseLTCG.vsprops.
+ * DumpRenderTree/win/DumpRenderTreeReleaseLTCG.vsprops: Removed.
+ * DumpRenderTree/win/ImageDiff.vcproj:
+ * DumpRenderTree/win/ImageDiffProduction.vsprops: Copied from Tools/DumpRenderTree/win/ImageDiffReleaseLTCG.vsprops.
+ * DumpRenderTree/win/ImageDiffReleaseLTCG.vsprops: Removed.
+ * FindSafari/FindSafari.vcproj:
+ * FindSafari/FindSafariProduction.vsprops: Copied from Tools/FindSafari/FindSafariReleaseLTCG.vsprops.
+ * FindSafari/FindSafariReleaseLTCG.vsprops: Removed.
+ * MiniBrowser/Configurations/MiniBrowserProduction.vsprops: Copied from Tools/MiniBrowser/Configurations/MiniBrowserReleaseLTCG.vsprops.
+ * MiniBrowser/Configurations/MiniBrowserReleaseLTCG.vsprops: Removed.
+ * MiniBrowser/MiniBrowser.vcproj:
+ * Scripts/webkitdirs.pm:
+ * TestWebKitAPI/win/TestWebKitAPI.sln:
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+ * TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj:
+ * TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj:
+ * WebKitAPITest/WebKitAPITest.vcproj:
+ * WebKitAPITest/WebKitAPITestProduction.vsprops: Copied from Tools/WebKitAPITest/WebKitAPITestReleaseLTCG.vsprops.
+ * WebKitAPITest/WebKitAPITestReleaseLTCG.vsprops: Removed.
+ * WebKitLauncherWin/WebKitLauncherWin.vcproj:
+ * WebKitLauncherWin/WebKitLauncherWinProduction.vsprops: Copied from Tools/WebKitLauncherWin/WebKitLauncherWinReleaseLTCG.vsprops.
+ * WebKitLauncherWin/WebKitLauncherWinReleaseLTCG.vsprops: Removed.
+ * WebKitTestRunner/WebKitTestRunner.sln:
+ * WebKitTestRunner/win/InjectedBundle.vcproj:
+ * WebKitTestRunner/win/InjectedBundleGenerated.vcproj:
+ * WebKitTestRunner/win/InjectedBundleProduction.vsprops: Copied from Tools/WebKitTestRunner/win/InjectedBundleReleaseLTCG.vsprops.
+ * WebKitTestRunner/win/InjectedBundleReleaseLTCG.vsprops: Removed.
+ * WebKitTestRunner/win/WebKitTestRunner.vcproj:
+ * WebKitTestRunner/win/WebKitTestRunnerProduction.vsprops: Copied from Tools/WebKitTestRunner/win/WebKitTestRunnerReleaseLTCG.vsprops.
+ * WebKitTestRunner/win/WebKitTestRunnerReleaseLTCG.vsprops: Removed.
+ * WinLauncher/WinLauncher.vcproj:
+ * WinLauncher/WinLauncherProduction.vsprops: Copied from Tools/WinLauncher/WinLauncherReleaseLTCG.vsprops.
+ * WinLauncher/WinLauncherReleaseLTCG.vsprops: Removed.
+ * record-memory-win/record-memory-win.vcproj:
+ * record-memory-win/record-memory-winProduction.vsprops: Copied from Tools/record-memory-win/record-memory-winReleaseLTCG.vsprops.
+ * record-memory-win/record-memory-winReleaseLTCG.vsprops: Removed.
+
+2011-03-30 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Expose the shadow DOM to DumpRenderTree JS tests.
+ https://bugs.webkit.org/show_bug.cgi?id=56573
+
+ Added LayoutTestController.shadowRoot() to Chromium DRT.
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::shadowRoot):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+
+2011-03-30 Yuta Kitamura <yutak@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [Chromium] DumpRenderTree: Implement LayoutTestController::setPluginsEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=57430
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::setPluginsEnabled):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+
+2011-03-30 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ make webkit-patch upload respect -d
+ https://bugs.webkit.org/show_bug.cgi?id=57425
+
+ * Scripts/webkitpy/common/checkout/scm.py:
+ * Scripts/webkitpy/tool/steps/commit.py:
+
+2011-03-30 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Adam Barth.
+
+ Make "webkit-patch --dry-run --verbose land" log the SVN command it's going to use
+ https://bugs.webkit.org/show_bug.cgi?id=57429
+
+ * Scripts/webkitpy/common/checkout/scm.py:
+
+2011-03-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r82383.
+ http://trac.webkit.org/changeset/82383
+ https://bugs.webkit.org/show_bug.cgi?id=57417
+
+ "nrwt isn't shutting down cleanly" (Requested by dpranke on
+ #webkit).
+
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2011-03-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Make validation message bubble testable
+ https://bugs.webkit.org/show_bug.cgi?id=57290
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow): Change a setting so that validation
+ bubbles isn't hidden automatically.
+
+2011-03-29 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ new-run-webkit-tests: use 'threads' on win instead of 'old-threads'
+
+ It's a bit unclear whether multiple threads or multiple
+ processes will be a better model on windows. This change will
+ test threads for now while we're still working out the bugs in
+ multiple-processes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=57410
+
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2011-03-29 David Levin <levin@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ check-webkit-style confused by two ChangeLog entries in a row from same user
+ https://bugs.webkit.org/show_bug.cgi?id=57250
+
+ * Scripts/webkitpy/style/checker.py: Add the line should be checked function to ChangeLogChecker.
+ * Scripts/webkitpy/style/checker_unittest.py: Fix test due to that new function.
+ * Scripts/webkitpy/style/checkers/changelog.py: Made this code aware of what lines were being checked.
+ It basically assumes only one ChangeLog entry is being processed because that is the standard case and
+ checking more than that would be very messey.
+ * Scripts/webkitpy/style/checkers/changelog_unittest.py: Add testing to catch the broken case.
+ * Scripts/webkitpy/style/error_handlers.py: Added should_line_be_checked.
+
+2011-03-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Mac] Enable interactive-validation tests on Mac DRT
+ https://bugs.webkit.org/show_bug.cgi?id=57308
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow): Enable the form interactive validation feature.
+
+2011-03-29 Chang Shu <cshu@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ WebKitTestRunner needs layoutTestController.setAllowUniversalAccessFromFileURLs
+ https://bugs.webkit.org/show_bug.cgi?id=42692
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::setAllowUniversalAccessFromFileURLs):
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+
+2011-03-24 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] [DRT] GtkScrolledWindow adds three pixels of padding between the WebView and the scrollbar
+ https://bugs.webkit.org/show_bug.cgi?id=57067
+
+ Eliminate extra spacing between the DRT GtkScrolledWindow and the DRT WebView. This
+ will allow WebKit1GTK+ and WebKit2GTK+ to share test results. Followup commits will
+ update DRT and pixel results as hundreds of results will need to be updated.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (setDefaultsToConsistentStateValuesForTesting): Eliminate spacing on the GtkScrolledWindow
+ by overriding the theme RC/CSS files.
+
+2011-03-29 Steve Falkenburg <sfalken@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Use per-configuration vsprops in tools projects to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
+ https://bugs.webkit.org/show_bug.cgi?id=57394
+
+ Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
+ InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
+ the IDE. To avoid this, add a separate vsprops file for each project configuration that
+ contains the required inherited property sheets.
+
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops: Added.
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops: Added.
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops: Added.
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops: Added.
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops: Added.
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseLTCG.vsprops: Added.
+ * DumpRenderTree/win/DumpRenderTree.vcproj:
+ * DumpRenderTree/win/DumpRenderTreeDebug.vsprops: Added.
+ * DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops: Added.
+ * DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops: Added.
+ * DumpRenderTree/win/DumpRenderTreeRelease.vsprops: Added.
+ * DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops: Added.
+ * DumpRenderTree/win/DumpRenderTreeReleaseLTCG.vsprops: Added.
+ * DumpRenderTree/win/ImageDiff.vcproj:
+ * DumpRenderTree/win/ImageDiffDebug.vsprops: Added.
+ * DumpRenderTree/win/ImageDiffDebugAll.vsprops: Added.
+ * DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops: Added.
+ * DumpRenderTree/win/ImageDiffRelease.vsprops: Added.
+ * DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops: Added.
+ * DumpRenderTree/win/ImageDiffReleaseLTCG.vsprops: Added.
+ * FindSafari/FindSafari.vcproj:
+ * FindSafari/FindSafariDebug.vsprops: Added.
+ * FindSafari/FindSafariDebugAll.vsprops: Added.
+ * FindSafari/FindSafariDebugCairoCFLite.vsprops: Added.
+ * FindSafari/FindSafariRelease.vsprops: Added.
+ * FindSafari/FindSafariReleaseCairoCFLite.vsprops: Added.
+ * FindSafari/FindSafariReleaseLTCG.vsprops: Added.
+ * FindSafari/FindSafariReleasePGO.vsprops: Added.
+ * MiniBrowser/Configurations/MiniBrowserDebug.vsprops: Added.
+ * MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops: Added.
+ * MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops: Added.
+ * MiniBrowser/Configurations/MiniBrowserRelease.vsprops: Added.
+ * MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops: Added.
+ * MiniBrowser/Configurations/MiniBrowserReleaseLTCG.vsprops: Added.
+ * MiniBrowser/MiniBrowser.vcproj:
+ * WebKitAPITest/WebKitAPITest.vcproj:
+ * WebKitAPITest/WebKitAPITestDebug.vsprops: Added.
+ * WebKitAPITest/WebKitAPITestDebugAll.vsprops: Added.
+ * WebKitAPITest/WebKitAPITestDebugCairoCFLite.vsprops: Added.
+ * WebKitAPITest/WebKitAPITestRelease.vsprops: Added.
+ * WebKitAPITest/WebKitAPITestReleaseCairoCFLite.vsprops: Added.
+ * WebKitAPITest/WebKitAPITestReleaseLTCG.vsprops: Added.
+ * WebKitLauncherWin/WebKitLauncherWin.vcproj:
+ * WebKitLauncherWin/WebKitLauncherWinDebug.vsprops: Added.
+ * WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops: Added.
+ * WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops: Added.
+ * WebKitLauncherWin/WebKitLauncherWinRelease.vsprops: Added.
+ * WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops: Added.
+ * WebKitLauncherWin/WebKitLauncherWinReleaseLTCG.vsprops: Added.
+ * WebKitTestRunner/win/InjectedBundle.vcproj:
+ * WebKitTestRunner/win/InjectedBundleDebug.vsprops: Added.
+ * WebKitTestRunner/win/InjectedBundleDebugAll.vsprops: Added.
+ * WebKitTestRunner/win/InjectedBundleDebugCairoCFLite.vsprops: Added.
+ * WebKitTestRunner/win/InjectedBundleRelease.vsprops: Added.
+ * WebKitTestRunner/win/InjectedBundleReleaseCairoCFLite.vsprops: Added.
+ * WebKitTestRunner/win/InjectedBundleReleaseLTCG.vsprops: Added.
+ * WebKitTestRunner/win/WebKitTestRunner.vcproj:
+ * WebKitTestRunner/win/WebKitTestRunnerDebug.vsprops: Added.
+ * WebKitTestRunner/win/WebKitTestRunnerDebugAll.vsprops: Added.
+ * WebKitTestRunner/win/WebKitTestRunnerDebugCairoCFLite.vsprops: Added.
+ * WebKitTestRunner/win/WebKitTestRunnerRelease.vsprops: Added.
+ * WebKitTestRunner/win/WebKitTestRunnerReleaseCairoCFLite.vsprops: Added.
+ * WebKitTestRunner/win/WebKitTestRunnerReleaseLTCG.vsprops: Added.
+ * WinLauncher/WinLauncher.vcproj:
+ * WinLauncher/WinLauncherDebug.vsprops: Added.
+ * WinLauncher/WinLauncherDebugAll.vsprops: Added.
+ * WinLauncher/WinLauncherDebugCairoCFLite.vsprops: Added.
+ * WinLauncher/WinLauncherRelease.vsprops: Added.
+ * WinLauncher/WinLauncherReleaseCairoCFLite.vsprops: Added.
+ * WinLauncher/WinLauncherReleaseLTCG.vsprops: Added.
+ * record-memory-win/record-memory-win.vcproj:
+ * record-memory-win/record-memory-winDebug.vsprops: Added.
+ * record-memory-win/record-memory-winDebugAll.vsprops: Added.
+ * record-memory-win/record-memory-winDebugCairoCFLite.vsprops: Added.
+ * record-memory-win/record-memory-winRelease.vsprops: Added.
+ * record-memory-win/record-memory-winReleaseCairoCFLite.vsprops: Added.
+ * record-memory-win/record-memory-winReleaseLTCG.vsprops: Added.
+
+2011-03-29 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ test_runner2.py can crash due to undefined variable
+ https://bugs.webkit.org/show_bug.cgi?id=57356
+
+ Replace reference to undefined variable with a variable that's actually
+ defined. AFAICT, there's no way to test this code.
+
+ * Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:
+
+2011-03-29 Tony Chang <tony@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ cleanup rebaseline-chromium-webkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=57375
+
+ * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
+ - Split _extract_and_add_new_baselines into 3 functions
+ - Reduce the amount of line wrapping (the file already has lines
+ over 80 col, so may as well try to make the file consistent)
+ - Remove unnecessary ()s
+
+2011-03-29 Brent Fulgham <bfulgham@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Make WinCairo a core builder.
+ https://bugs.webkit.org/show_bug.cgi?id=57373
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py: Add WinCairo.
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py: Add WinCairo.
+
+2011-03-29 Timothy Hatcher <timothy@apple.com>
+
+ Update update-webkit-localizable-strings to understand that WebKit and
+ WebKit2 strings go in WebCore.
+
+ Also make extract-localizable-strings optionally use an exclude file. No individual
+ warnings are produced about unlocalized strings when there is no exclude file. This
+ is needed for WebCore, since there are too many bare strings.
+
+ https://webkit.org/b/57354
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/extract-localizable-strings: Support "-" to mean no exclude file.
+ * Scripts/update-webkit-localizable-strings: Update paths to scan WebCore and WebKit2.
+
+2011-03-29 Darin Adler <darin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ WebKit2 bundle page needs to offer generated file hooks
+ https://bugs.webkit.org/show_bug.cgi?id=57279
+
+ (Land missing part of the original patch after r82289.)
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage): Added new callbacks.
+
+2011-03-29 Tony Chang <tony@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ [chromium] NRWT should be able to read checksums from png comments
+ https://bugs.webkit.org/show_bug.cgi?id=57280
+
+ * Scripts/read-checksum-from-png: Added. Utility script to read the checksum
+ from a file.
+ * Scripts/webkitpy/common/system/filesystem.py: Add open_binary_file_for_reading
+ * Scripts/webkitpy/common/system/filesystem_mock.py:
+ * Scripts/webkitpy/layout_tests/port/base.py: When loading a checksum,
+ if the -checksum.txt file doesn't exist, try looking in the png.
+ * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/read_checksum_from_png.py: Added. Scan the first
+ 2k for a png comment with the checksum
+ * Scripts/webkitpy/layout_tests/read_checksum_from_png_unittest.py: Added.
+
+2011-03-29 Philippe Normand <pnormand@igalia.com>
+
+ Rubber-stamped by Gustavo Noronha Silva.
+
+ [GTK] http/tests/uri/username-with-no-hostname.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=57325
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (willSendRequestCallback): URI host value check done case-insensitively.
+
+2011-03-29 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] http/tests/uri/username-with-no-hostname.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=57325
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (willSendRequestCallback): Check URI before submitting the request
+ to WebCore.
+
+2011-03-29 Noel Gordon <noel.gordon@gmail.com>
+
+ Reviewed by Ojan Vafai.
+
+ [chromium] DRT EventSender: remove identity from dragTargetDragEnter() calls
+ https://bugs.webkit.org/show_bug.cgi?id=57303
+
+ * DumpRenderTree/chromium/EventSender.cpp:
+ (EventSender::doDragDrop):
+ (EventSender::beginDragWithFiles):
+
+2011-03-29 Zoltan Horvath <zoltan@webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Add -print-loaded-urls option to Qt's MiniBrowser and to QtTestBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=57314
+
+ Provide possibility to print loaded urls to the standard output.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::BrowserWindow):
+ (BrowserWindow::printURL):
+ * MiniBrowser/qt/BrowserWindow.h:
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::handleUserOptions):
+ * MiniBrowser/qt/MiniBrowserApplication.h:
+ (WindowOptions::WindowOptions):
+ * QtTestBrowser/launcherwindow.cpp:
+ (LauncherWindow::initializeView):
+ (LauncherWindow::printURL):
+ (LauncherWindow::cloneWindow):
+ * QtTestBrowser/launcherwindow.h:
+ (WindowOptions::WindowOptions):
+ * QtTestBrowser/main.cpp:
+ (LauncherApplication::handleUserOptions):
+
+2011-03-29 Gabor Loki <loki@webkit.org>
+
+ Rubber-stamped by Csaba Osztrogonác.
+
+ [Qt] Teach build-jsc how to build JavaScriptCore on Qt
+ https://bugs.webkit.org/show_bug.cgi?id=56918
+
+ * Scripts/build-jsc: Remove duplicated --qt options to avoid passing them to qmake.
+
+2011-03-28 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Csaba Osztrogonác.
+
+ [Qt] Teach build-jsc how to build JavaScriptCore on Qt
+ https://bugs.webkit.org/show_bug.cgi?id=56918
+
+ * Scripts/build-jsc:
+ * Scripts/webkitdirs.pm:
+
+2011-03-28 Andrew Foster <andrewf@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ webkit-patch should be more intelligent about whether a bug applies to a patch
+ Create a new function, parse_bug_id_from_changelog() which determines
+ that a bug is related to a patch by parsing the output generated from
+ prepare-ChangeLog, rather than arbitrarily matching a URL to a bug in
+ the description of a patch.
+ https://bugs.webkit.org/show_bug.cgi?id=56989
+
+ * Scripts/webkitpy/common/checkout/api.py:
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ * Scripts/webkitpy/common/net/bugzilla/__init__.py:
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+ * Scripts/webkitpy/style/checkers/changelog.py:
+ * Scripts/webkitpy/tool/commands/upload.py:
+
+2011-03-28 Maciej Stachowiak <mjs@apple.com>
+
+ Revert accidentally commited change.
+
+ * DumpRenderTree/mac/ResourceLoadDelegate.mm:
+ (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
+
+2011-03-28 Tony Chang <tony@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [chromium] have DRT write the png checksum into a png comment
+ https://bugs.webkit.org/show_bug.cgi?id=57255
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dumpImage):
+
+2011-03-28 Adele Peterson <adele@apple.com>
+
+ Removing Qt stub, since it doesn't use the same header as the others.
+
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+
+2011-03-28 Adele Peterson <adele@apple.com>
+
+ Added a few more stubs.
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::hasGrammarMarker):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::hasGrammarMarker):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::hasGrammarMarker):
+
+2011-03-28 Adele Peterson <adele@apple.com>
+
+ Build fix.
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::hasGrammarMarker):
+
+2011-03-28 Adele Peterson <adele@apple.com>
+
+ Reviewed by Eric Seidel.
+
+ Testing support for <rdar://problem/9112694> REGRESSION (r79411): "Check grammar with spelling" context menu doesn't check as you type
+ https://bugs.webkit.org/show_bug.cgi?id=57173
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (hasGrammarMarkerCallback): Added.
+ (LayoutTestController::staticFunctions): Added case for hasGrammarMarker.
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/DumpRenderTree.mm: (createWebViewAndOffscreenWindow): Call setGrammarCheckingEnabled.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: (LayoutTestController::hasGrammarMarker): Added. Call new hasGrammarMarker method.
+
+2011-03-28 Csaba Osztrogonác <ossy@webkit.org>
+
+ Reviewed by Benjamin Poulain.
+
+ [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
+ https://bugs.webkit.org/show_bug.cgi?id=57087
+
+ Trivial typo fix after r82082.
+
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+
+2011-03-28 Alexis Menard <alexis.menard@openbossa.org>
+
+ Reviewed by Andreas Kling.
+
+ Add myself to the committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-03-28 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit2 unfortunately uses code from WebKit, so MiniBrowser needs
+ to link against WebKit.framework for now.
+
+ * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
+
+2011-03-28 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
+ https://bugs.webkit.org/show_bug.cgi?id=57087
+
+ Disable QT_ASCII_CAST_WARNINGS for applications.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/ImageDiff.pro:
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * QtTestBrowser/QtTestBrowser.pro:
+ * WebKitTestRunner/qt/WebKitTestRunner.pro:
+
+2011-03-28 Andreas Kling <kling@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QtTestBrowser doesn't reset its window title when opening about:blank
+ https://bugs.webkit.org/show_bug.cgi?id=57224
+
+ * QtTestBrowser/mainwindow.cpp:
+ (MainWindow::buildUI):
+ (MainWindow::onTitleChanged):
+ * QtTestBrowser/mainwindow.h:
+
+2011-03-27 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ Full Screen: disable keyboard access by default
+ https://bugs.webkit.org/show_bug.cgi?id=56684
+
+ Accept the withKeyboard parameter to supportsFullScreenForElement.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:supportsFullScreenForElement:withKeyboard:]):
+
+2011-03-27 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by David Levin.
+
+ check-webkit-style should check ChangeLog for a valid bug number
+ https://bugs.webkit.org/show_bug.cgi?id=57184
+
+ * Scripts/webkitpy/style/checker.py:
+ * Scripts/webkitpy/style/checker_unittest.py:
+ * Scripts/webkitpy/style/checkers/changelog.py: Added.
+ * Scripts/webkitpy/style/checkers/changelog_unittest.py: Added.
+
+2011-03-27 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
+ https://bugs.webkit.org/show_bug.cgi?id=57087
+
+ Use explicit conversion for string to avoid depending on the default codec
+ installed by the user code.
+
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+
+2011-03-26 Maciej Stachowiak <mjs@apple.com>
+
+ Revert inadvertantly committed changes.
+
+ * Scripts/old-run-webkit-tests:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
+2011-03-26 Andreas Kling <kling@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Show page icons (favicons) in QtTestBrowser location bar.
+ https://bugs.webkit.org/show_bug.cgi?id=57162
+
+ * QtTestBrowser/QtTestBrowser.qrc:
+ * QtTestBrowser/favicon.png: Added.
+ * QtTestBrowser/locationedit.cpp:
+ (defaultPageIcon):
+ (LocationEdit::LocationEdit):
+ (LocationEdit::setPageIcon):
+ (LocationEdit::resizeEvent):
+ (LocationEdit::updateInternalGeometry):
+ * QtTestBrowser/locationedit.h:
+ * QtTestBrowser/mainwindow.cpp:
+ (MainWindow::buildUI):
+ (MainWindow::onIconChanged):
+ (MainWindow::onLoadStarted):
+ * QtTestBrowser/mainwindow.h:
+
+2011-03-23 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Force DumpRenderTree to use 96 DPI
+ https://bugs.webkit.org/show_bug.cgi?id=56866
+
+ Make sure that GTK+ is set to use 96 DPI when running tests. This ensures
+ broader compatibility with WebKit2 and makes setting font sizes more straightforward.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (initializeGtkFontSettings): Set the screen resolution and GTK+ xft property to 96 DPI.
+ (resetDefaultsToConsistentValues):Remove the call which repeatedly set the GDK screen resolution.
+ (setDefaultsToConsistentStateValuesForTesting): Update the font sizes to reflect the new DPI.
+
+2011-03-25 Andy Estes <aestes@apple.com>
+
+ Reviewed by Adele Peterson.
+
+ REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
+ https://bugs.webkit.org/show_bug.cgi?id=49016
+
+ TestNetscapePlugIn needs to register support for an image MIME type so
+ we can test that the embed tag prefers plug-ins to render image MIME
+ types.
+
+ * DumpRenderTree/TestNetscapePlugIn/mac/Info.plist: Register image/png.
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NP_GetMIMEDescription): Ditto.
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc: Ditto.
+
+2011-03-25 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKit2: Need to be able to set and get the Cookie Storage Policy.
+ https://bugs.webkit.org/show_bug.cgi?id=50780
+
+ Add a test for getting and setting the HTTP Cookie Accept Policy in WebKit2.
+
+ The test is named "CookieManager" so that we can eventually exercise more of the
+ CookieManager functionality in the test.
+
+ * TestWebKitAPI/Tests/WebKit2/CookieManager.cpp: Added.
+ (TestWebKitAPI::didGetTestHTTPCookieAcceptPolicy):
+ Assert that the policy returned is equal to the policy set in
+ didGetUserHTTPCookieAcceptPolicy, and then restore the user's policy.
+ (TestWebKitAPI::didGetUserHTTPCookieAcceptPolicy):
+ Set the policy to something different than the user's policy and get the policy again.
+ (TestWebKitAPI::didFinishLoadForFrame):
+ Get the user's policy so that it can be restored at the end of the test.
+ (TestWebKitAPI::TEST):
+ Load about:blank so that the Web Process gets instatiated (needed to get the
+ CookieManager).
+
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+ Add CookieManager.cpp.
+
+2011-03-24 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Fix the build so that gcc-4.1 and up can be used to build on SnowLeopard.
+
+ * wx/build/settings.py:
+
+2011-03-24 Ilya Sherman <isherman@chromium.org>
+
+ Reviewed by Adam Roben.
+
+ Implement layoutTestController.setAutoFilled in DRT on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=56828
+
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setAutofilled): Implemented.
+
+2011-03-24 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed build correction.
+
+ Correct vsprops file for Debug variant of the CFLite build.
+ Disable a CFNETWORK-specific test when building for CFLite.
+
+ * TestWebKitAPI/Configurations/TestWebKitAPIDebugCairoCFLite.vsprops:
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+
+2011-03-24 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ fix regressions introduced in 81908 - there were a couple of
+ code paths that only fired under python 2.5 that I missed.
+
+ Also change a couple of 'python' references to sys.executable
+ in order to handle runing test-webkitpy with a binary other than
+ something called 'python'.
+
+ https://bugs.webkit.org/show_bug.cgi?id=57063
+
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ * Scripts/webkitpy/test/cat.py:
+ * Scripts/webkitpy/test/echo.py:
+
+2011-03-24 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed build correction.
+
+ Add a stub implementation of the TestInvocation dumping logic.
+ Update project files to reflect new file.
+
+ * WebKitTestRunner/cairo: Added.
+ * WebKitTestRunner/cairo/TestInvocationCairo.cpp: Added.
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+ * WebKitTestRunner/win/WebKitTestRunner.vcproj:
+
+2011-03-24 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ new-run-webkit-tests: clean up worker model defaults. This
+ changes the default behavior to 'threads' instead of
+ 'old-threads', and clarifies that chromium-win-* and
+ chromium-mac-leopard are exceptions.
+
+ https://bugs.webkit.org/show_bug.cgi?id=56971
+
+ * Scripts/webkitpy/layout_tests/port/base.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/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2011-03-23 Leandro Gracia Gil <leandrogracia@chromium.org>
+
+ Reviewed by Darin Adler.
+
+ Media Stream API: fix the order of the options in build-webkit.
+ https://bugs.webkit.org/show_bug.cgi?id=56949
+
+ Fix the order of the options in build-webkit.
+
+ * Scripts/build-webkit:
+
+2011-03-23 Adam Klein <adamk@chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ Add an option to new-run-webkit-httpd to allow overriding the location of LayoutTests directory
+ https://bugs.webkit.org/show_bug.cgi?id=56884
+
+ This option will be utilized by Chromium's ui_tests to allow
+ referencing js-test-resources from a layout test over HTTP.
+
+ * Scripts/new-run-webkit-httpd:
+ Added --layout_tests_dir option.
+ * Scripts/webkitpy/layout_tests/port/http_server.py:
+ Plumbed through as layout_tests_dir param.
+
+2011-03-23 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ new-run-webkit-tests: run tests in ascending alphabetical order per
+ dir. This is a second attempt at the fix; the first attempt, in
+ r81597, broke the behavior on the old-inline and old-threads
+ worker models.
+
+ https://bugs.webkit.org/show_bug.cgi?id=56760
+
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2011-03-23 Mario Sanchez Prada <msanchez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] GTK's DRT to ouput detail's string for the 'property-change' signal
+ https://bugs.webkit.org/show_bug.cgi?id=56953
+
+ Print the string for the detail of 'property-change' signal.
+
+ * DumpRenderTree/gtk/AccessibilityCallbacks.cpp:
+ (axObjectEventListener): Print the detail string.
+
+2011-03-23 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ [V8] Web Inspector: compile DebuggerScript.js into DebuggerScriptSource.h
+ https://bugs.webkit.org/show_bug.cgi?id=56843
+
+ * DumpRenderTree/chromium/DRTDevToolsAgent.cpp:
+ * DumpRenderTree/chromium/DRTDevToolsAgent.h:
+
+2011-03-22 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Teach update-webkit about gyp
+ https://bugs.webkit.org/show_bug.cgi?id=56881
+
+ This makes it possible for someone who builds from Xcode
+ to just run update-webkit --gyp and have the project files
+ generated after update automatically.
+
+ I also added a stand-alone "generate-project-files" script
+ wrapping Source/gyp/configure. This makes running gyp simpler
+ since most people will not have gyp or Source/gyp in their path.
+
+ * Scripts/build-webkit:
+ * Scripts/generate-project-files: Added.
+ * Scripts/update-webkit:
+
+2011-03-22 Anton D'Auria <adauria@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add +[WebApplicationCache getOriginsWithCache]
+ https://bugs.webkit.org/show_bug.cgi?id=56722
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (originsWithApplicationCacheCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp: Added stub.
+ (LayoutTestController::originsWithApplicationCache):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Added stub.
+ (LayoutTestController::originsWithApplicationCache):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: Pass array of origin's database identifiers.
+ (originsArrayToJS): Helper function for converting array of WebSecurityOrigins to a JS array of origin identifiers.
+ (LayoutTestController::originsWithApplicationCache):
+ (LayoutTestController::originsWithLocalStorage):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp: Added stub.
+ (LayoutTestController::originsWithApplicationCache):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp: Added stub.
+ (LayoutTestController::originsWithApplicationCache):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp: Added stub.
+ (LayoutTestController::originsWithApplicationCache):
+
+2011-03-22 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add support to build-webkit for building with gyp-generated project files
+ https://bugs.webkit.org/show_bug.cgi?id=56877
+
+ build-webkit is a cesspool. This change just hacks in --gyp support for Mac.
+ Eventually we'll want to support gyp-generated projects in a more general manner.
+
+ * Scripts/build-webkit:
+
+2011-03-22 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/56781> Add --dsym switch to enable dsym generation when building with Xcode
+
+ Reviewed by Joseph Pecoraro.
+
+ * Scripts/build-webkit: Updated usage statement to include
+ --dsym.
+ * Scripts/webkitdirs.pm: Added $generateDsym variable.
+ (generateDsym): Added. Call determineGenerateDsym() and
+ return $generateDsym.
+ (determineGenerateDsym): Added. Parse @ARGV for --dsym and set
+ $generateDsym.
+ (argumentsForXcode): Added. Returns additional arguments for
+ xcodebuild based on command-line switches.
+ (XcodeOptions): Updated to include argumentsForXcode() in the
+ array returned.
+
+2011-03-22 Adam Roben <aroben@apple.com>
+
+ Make Leopard Debug bots and Windows XP Debug (Tests) core builders
+
+ These bots are consistently green again.
+
+ Fixes <http://webkit.org/b/56830> Leopard Debug bots and Windows XP Debug (Tests) should be
+ core builders
+
+ Rubber-stamped by Antti Koivisto.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ (BuildBot.__init__): Loosened the regexps for Leopard and Windows.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+ (BuildBotTest.test_builder_name_regexps): Updated expectations.
+
+2011-03-21 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r81597.
+ http://trac.webkit.org/changeset/81597
+ https://bugs.webkit.org/show_bug.cgi?id=56801
+
+ Change results in lots of unexpected flaky on the dashboard.
+ (Requested by pfeldman on #webkit).
+
+ * Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2011-03-21 Sam Weinig <sam@webkit.org>
+
+ Fix failing tests on the WebKit2 bots.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
+2011-03-21 Daniel Sievers <sievers@google.com>
+
+ Reviewed by Simon Fraser.
+
+ [Chromium] Make RenderAsTextBehavior and LayerTreeAsTextBehavior tweakable from the DumpRenderTree commandline
+ https://bugs.webkit.org/show_bug.cgi?id=56139
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::layerTreeAsText):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ (LayoutTestController::setShowDebugLayerTree):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::runFileTest):
+ (TestShell::dump):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestParams::TestParams):
+
+2011-03-21 Adam Roben <aroben@apple.com>
+
+ Try again to get buildbot to show run-javascriptcore-tests's actual.html as an HTML file
+
+ Fixes <http://webkit.org/b/56746> build.webkit.org shows run-javascriptcore-tests's HTML
+ output as plain text
+
+ Reviewed by David Kilzer.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunJavaScriptCoreTests): List actual.html as one of our log files so it will get uploaded
+ to the master.
+ (RunJavaScriptCoreTests.commandComplete): Reading the actual.html file here won't work,
+ since we're running on the build master, not the slave. Instead, turn the raw source of
+ actual.html which the build slave uploaded into an HTML log.
+
+2011-03-21 Dirk Pranke <dpranke@chromium.org>
+
+ Reviewed by Mihai Parparita.
+
+ new-run-webkit-tests: run tests in ascending alphabetical order per dir
+ https://bugs.webkit.org/show_bug.cgi?id=56760
+
+ * Scripts/webkitpy/layout_tests/layout_package/test_runner.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+
+2011-03-21 Leandro Gracia Gil <leandrogracia@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Media Stream API patch 0: adding compilation guards.
+ https://bugs.webkit.org/show_bug.cgi?id=56458
+
+ Adding options to enable the media stream API feature in Chromium.
+
+ * Scripts/build-webkit:
+
+2011-03-21 Qi Zhang <qi.2.zhang@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Add a command line option to capture stdout and stderr for DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=56323
+
+ Using freopen to redirect STDOUT and STDERR when DumpRenderTree command line provide
+ "--stdout" or "--stderr" option.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::~DumpRenderTree):
+ (WebCore::DumpRenderTree::processArgsLine):
+ (WebCore::DumpRenderTree::loadNextTestInStandAloneMode):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (WebCore::DumpRenderTree::setRedirectOutputFileName):
+ (WebCore::DumpRenderTree::setRedirectErrorFileName):
+ * DumpRenderTree/qt/main.cpp:
+ (isOption):
+ (takeOptionValue):
+ (printUsage):
+ (main):
+
+2011-03-21 Adam Roben <aroben@apple.com>
+
+ Fix exceptions on the buildbot due to my last change
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunJavaScriptCoreTests.commandComplete): Catch exceptions due to actual.html not existing.
+
+2011-03-21 Adam Roben <aroben@apple.com>
+
+ Teach buildbot to treat run-javascriptcore-tests's actual.html as an HTML file
+
+ Fixes <http://webkit.org/b/56746> build.webkit.org shows run-javascriptcore-tests's HTML
+ output as plain text
+
+ Reviewed by Darin Adler.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunJavaScriptCoreTests): Removed the logfiles variable, which can only handle plaintext
+ logs.
+ (RunJavaScriptCoreTests.commandComplete): Use the addHTMLLog method to upload actual.html to
+ the build master. This will correctly treat it as HTML.
+
+2011-03-20 Bill Budge <bbudge@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Rename ThreadSafeShared to ThreadSafeRefCounted
+ https://bugs.webkit.org/show_bug.cgi?id=56714
+
+ No new tests. Exposes no new functionality.
+
+ * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h: Copied from DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h.
+ * DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h: Removed.
+ * Scripts/do-webcore-rename:
+
+2011-03-19 Anton D'Auria <adauria@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add stub to LayoutTestControllerGtk.cpp to fix GTK build
+ https://bugs.webkit.org/show_bug.cgi?id=56719
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Adding stub.
+ (LayoutTestController::clearApplicationCacheForOrigin):
+
+2011-03-19 Anton D'Auria <adauria@apple.com>
+
+ Reviewed by Alexey Proskuryakov.
+
+ ApplicationCacheGroup is not obsolete after being deleted via ApplicationCacheStorage::deleteEntriesForOrigin
+ https://bugs.webkit.org/show_bug.cgi?id=56415
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (clearApplicationCacheForOriginCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp: Adding stubs.
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::clearAllApplicationCaches):
+ (LayoutTestController::clearApplicationCacheForOrigin):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm: Adding stub.
+ (LayoutTestController::clearApplicationCacheForOrigin):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp: Adding stub.
+ (LayoutTestController::clearApplicationCacheForOrigin):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp: Adding stub.
+ (LayoutTestController::clearApplicationCacheForOrigin):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp: Adding stub.
+ (LayoutTestController::clearApplicationCacheForOrigin):
+
+2011-03-18 Dan Bernstein <mitz@apple.com>
+
+ Revised build fix for r81135.
+
+ * WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Windows build fix
+
+ * WebKitTestRunner/config.h: Add a missing #endif.
+
+2011-03-18 Andreas Kling <kling@webkit.org>
+
+ Unbreak Qt build after r81494.
+
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2011-03-18 Sam Weinig <sam@webkit.org>
+
+ Fix windows build. This was really Adam Roben's fault. I swear!
+
+ * WebKitTestRunner/config.h:
+
+2011-03-18 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Pixel tests don't work in WebKitTestRunner on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=56630
+
+ Cross-platformize (Mac and Windows CG) the pixel dumping code in WebKitTestRunner to use WebKit2
+ built-in snapshotting instead of using the window server on the Mac.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::InjectedBundle):
+ (WTR::InjectedBundle::didReceiveMessage):
+ (WTR::InjectedBundle::beginTesting):
+ (WTR::InjectedBundle::done):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (WTR::InjectedBundle::setPixelResult):
+ (WTR::InjectedBundle::shouldDumpPixels):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::dump):
+ Take the snapshot in the bundle and send it to the UIProcess for dumping.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::dump):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/TestInvocation.h:
+ * WebKitTestRunner/cg: Added.
+ * WebKitTestRunner/cg/TestInvocationCG.cpp: Copied from WebKitTestRunner/mac/TestInvocationMac.mm.
+ (WTR::createCGContextFromImage):
+ (WTR::computeMD5HashStringForContext):
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+ * WebKitTestRunner/mac/TestInvocationMac.mm: Removed.
+ Making pixel dumping code shared for CG ports. Also use the WTF/MD5 instead of platform specific code.
+
+ * WebKitTestRunner/win/TestInvocationWin.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+ Keep stub for Cairo build.
+
+ * WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops: Added.
+ Add CG configuration.
+
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+ * WebKitTestRunner/win/WebKitTestRunner.vcproj:
+ Add new files.
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Don't allow Leaks Viewer's vertical scrollbar to cover up long function names
+
+ Rubber-stamped by Simon Fraser.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css:
+ (.data-grid .data-container): Use overflow-y:auto instead of the Inspector's default
+ overflow-y:overlay so that the scrollbar doesn't overlay the content.
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Don't ellipsize long or indented function names in Leaks Viewer
+
+ Fixes <http://webkit.org/b/56037> Leaks viewer needs horizontal
+ scrollbar
+
+ Reviewed by Simon Fraser.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css:
+ (.data-grid .data-container):
+ (.data-grid td > div, .data-grid th > div):
+ Allow the contents to extend to the right.
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Fix some leaks in DRT seen on the leaks bot
+
+ Fixes <http://webkit.org/b/56638> addURLToRedirectCallback and
+ setWillSendRequestClearHeaderCallback in DRT are leaky
+
+ Reviewed by Alexey Proskuryakov.
+
+ * DumpRenderTree/ForwardingHeaders/wtf/OwnArrayPtr.h: Added.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (addURLToRedirectCallback):
+ (setWillSendRequestClearHeaderCallback):
+ Use OwnArrayPtr to cause the strings to be deleted.
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Fix a NSURLCredential leak seen on the leaks bot
+
+ Fixes <http://webkit.org/b/56637> -[SynchronousLoader
+ connection:didReceiveAuthenticationChallenge:] is leaky
+
+ Reviewed by John Sullivan.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (-[SynchronousLoader connection:didReceiveAuthenticationChallenge:]): Use a RetainPtr to
+ cause the NSURLCredential to be released.
+
+2011-03-18 John Knottenbelt <jknotten@chromium.org>
+
+ Unreviewed.
+
+ Remove unnecessary brackets around my email address.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Remove some files I accidentally added in r81454
+
+ * WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops: Removed.
+ * WebKitTestRunner/cg/TestInvocationCG.cpp: Removed.
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Ignore an NSNumberFormatter leak on SnowLeopard
+
+ * Scripts/old-run-webkit-tests:
+ (countAndPrintLeaks): Ignore leaks in -[NSNumberFormatter
+ getObjectValue:forString:errorDescription:].
+
+2011-03-18 Adam Roben <aroben@apple.com>
+
+ Fix a leak beneath LayoutTestController::authenticateSession seen on the bots
+
+ Rubber-stamped by Mark Rowe.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::authenticateSession): Use a RetainPtr to cause the NSURLRequest to be
+ released.
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Address a review comment I missed in r81445
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js:
+ (LeaksParserWorker.prototype._parseLeaks): Anchor the RegExp used to find the number of
+ leaked bytes to speed up searching on long lines.
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Mark leaky builds orange, even if all regression tests passed
+
+ Fixes <http://webkit.org/b/56609> SnowLeopard Intel Leaks bot appears green on
+ build.webkit.org when all tests pass even though there are still leaks
+
+ Reviewed by Dan Bernstein.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunWebKitLeakTests): Set the warnOnWarnings property to True so that the entire build will
+ be marked orange if this build step generates warnings.
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Allow values in Leaks Viewer to be shown as percentages
+
+ Double-clicking on a column will toggle between showing percentages and showing real values.
+
+ Fixes <http://webkit.org/b/56628> Would like to view values as percentages of the total
+ number of leaked bytes in Leaks Viewer
+
+ Reviewed by Joe Pecoraro.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js:
+ (LeaksParserWorker.prototype._incorporateLeaks): Calculate the (never-shown) top-level
+ node's totalTime, which is used in calculating percentages.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js:
+ (monkeyPatchInspectorObjects): Only format values as bytes if we aren't supposed to be
+ showing them as percentages.
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Show the number of leaked bytes, not just leaked allocations, in Leaks Viewer
+
+ The Self and Total columns now report the number of leaked bytes. The new Calls column shows
+ the number of leaked allocations. And the new Average column shows the average number of
+ leaked bytes per call.
+
+ Fixes <http://webkit.org/b/56344> Leaks Viewer should show how many bytes were leaked, not
+ just how many allocations
+
+ Reviewed by Joe Pecoraro.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js:
+ (LeaksParserWorker.prototype._parseLeaks): Parse the number of leaked bytes from the "Leak:"
+ line and store it with the leak stack.
+ (LeaksParserWorker.prototype._createNode): Initialize the averageTime and numberOfCalls
+ properties.
+ (LeaksParserWorker.prototype._incorporateLeaks): Updated to get the stack from the .stack
+ property, and changed to store the number of leaked bytes in .selfTime/.totalTime.
+ .numberOfCalls now holds the number of leaked allocations.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js:
+ (Preferences): Set samplingCPUProfiler to false so that the Average and Calls columns will
+ appear.
+ (monkeyPatchInspectorObjects): Format the values as bytes.
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Make Leaks Viewer able to count leaks in builds that didn't fail any regression tests
+
+ Fixes <http://webkit.org/b/56626> Leaks Viewer omits recent builds which didn't fail any
+ regression tests
+
+ Reviewed by James Robinson.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:
+ (RecentBuildsLoader.prototype.start): Get the number of leaks out of the "text" array, which
+ is always populated, even when all regression tests pass.
+
+2011-03-10 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Add a check logic for reftests in case that a reftest is marked AS REBASELINE.
+
+ https://bugs.webkit.org/show_bug.cgi?id=56076
+
+ * Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py:
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Skip a compositing-sensitive test when accelerated compositing is disabled
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/old-run-webkit-tests: Skip media/media-document-audio-repaint.html when
+ accelerated compositing is disabled.
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Start using PlatformSpecificScheduler for the Mac builders
+
+ The current set of file/directory patterns should work for Mac builders. We may discover
+ that there are more files and directories we can exclude from the Mac builds, but they can
+ be added later.
+
+ Fixes <http://webkit.org/b/56593> Mac builders do lots of unnecessary builds
+
+ Reviewed by Mark Rowe.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json: Moved the Mac builders into two
+ PlatformSpecificSchedulers: one for Leopard, and one for SnowLeopard.
+
+ * Scripts/webkitpy/common/config/build.py:
+ (_should_file_trigger_build): Allow "mac-leopard" and "mac-snowleopard" platforms, and
+ cleaned up patterns a little bit.
+
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest): Fixed some expected results.
+ (ShouldBuildTest.test_should_build): Start testing "mac-leopard" and "mac-snowleopard"
+ platforms.
+
+2011-03-17 Jeff Miller <jeffm@apple.com>
+
+ Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
+
+ *.mode*
+ *.pbxuser
+ *.perspective*
+ project.xcworkspace
+ xcuserdata
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj: Modified property svn:ignore.
+ * MiniBrowser/MiniBrowser.xcodeproj: Modified property svn:ignore.
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj: Modified property svn:ignore.
+ * WebKitLauncher/WebKitLauncher.xcodeproj: Modified property svn:ignore.
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj: Modified property svn:ignore.
+
+2011-03-17 Adam Roben <aroben@apple.com>
+
+ Make old-run-webkit-tests pick up mac-wk2 results when running in WebKit2 mode on Windows
+
+ Fixes <http://webkit.org/b/56563> Running WebKit2 tests on Windows should use results from
+ mac-wk2
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/old-run-webkit-tests:
+ (expectedDirectoryForTest): Clean up the code to search in extra Mac platform result
+ directories on Windows. Add mac-wk2 to the set of extra platforms we look in on Windows when
+ we're running in WebKit2 mode.
+
+2011-03-17 Mikhail Naganov <mnaganov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Clean up Inspector strings.
+ https://bugs.webkit.org/show_bug.cgi?id=56557
+
+ Modify the script to deal correctly with "\xNN" escapes, and to
+ check strings in Chromium's DevTools.js.
+
+ * Scripts/check-inspector-strings:
+
+2011-03-17 Keith Kyzivat <keith.kyzivat@nokia.com>
+
+ Reviewed by Benjamin Poulain.
+
+ Update autoinstall to install mechanize 0.2.4
+ https://bugs.webkit.org/show_bug.cgi?id=56499
+
+ Newer versions of mechanize support HTTPS proxies, which is necessary
+ for people using webkit-patch behind firewalls.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ * Scripts/webkitpy/thirdparty/__init__.py:
+
+2011-03-16 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ REGRESSION (r81084): media/invalid-media-url-crash.html and editing/execCommand/indent-paragraphs.html failing on WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=56541
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::willSendRequestForFrame):
+ Check for an empty host in addition to a null host. This bug was introduced
+ when porting off of the KURL code and onto the WKURLRef version.
+
+2011-03-16 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ Add Lucas Forschler to the list of WebKit committers.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-03-16 Sam Weinig <sam@webkit.org>
+
+ Reviewed upon and dictated through Adam Roben.
+
+ Escape crashing function names in results.html. This fixes an issue
+ when a crash involves a type with templates.
+
+ * Scripts/old-run-webkit-tests:
+
+2011-03-16 Daniel Sievers <sievers@google.com>
+
+ Reviewed by James Robinson.
+
+ Add setting to always force compositing mode
+ https://bugs.webkit.org/show_bug.cgi?id=56156
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setForceCompositingMode):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+
+2011-03-15 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Ignore files that will be used by reftests in old-run-webkit-tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=55936
+
+ * Scripts/old-run-webkit-tests:
+
+2011-03-15 Felipe Oliveira da Silva Netto <f.dachshund@gmail.com>
+
+ Reviewed by Adam Roben.
+
+ Function relativeScriptsDir doesn't return the correct relative
+ Scripts directory.
+
+ * Scripts/webkitdirs.pm:
+ (relativeScriptsDir): Ensure we use the directory that contains
+ webkitdirs.pm, not the one that contains the original script that
+ was invoked.
+
+2011-03-15 Kevin Ollivier <kevino@theolliviers.com>
+
+ [wx] Build fixes for long linker commands on Win and method return error, plus a Mac
+ fix to link against the Security framework after recent WebKitSystemInterface changes.
+
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::originsWithLocalStorage):
+ * wx/build/settings.py:
+ * wx/build/waf_extensions.py:
+
+2011-03-15 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Add script to convert a patch to a prettypatch and show in the default browser
+ https://bugs.webkit.org/show_bug.cgi?id=56416
+
+ This can be used either like
+ $ svn-create-patch | show-pretty-diff
+ or
+ $ show-pretty-diff patch.diff
+
+ * Scripts/show-pretty-diff: Added.
+
+2011-03-15 Brian Weinstein <bweinstein@apple.com>
+
+ Rubber-stamped by Adam Roben.
+
+ Adding myself as a reviewer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-03-15 Anders Carlsson <andersca@apple.com>
+
+ Try to fix the Windows build.
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp:
+ (NPDeallocateCalledBeforeNPShutdown::TestObject::~TestObject):
+
+2011-03-15 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Make sure that NP_Shutdown is always the last NPP function called
+ https://bugs.webkit.org/show_bug.cgi?id=56391
+
+ Add a test that times out if an NP_Deallocate object is called after NP_Shutdown.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
+ (PluginTest::PluginTest):
+ (PluginTest::NP_Shutdown):
+ (PluginTest::registerNPShutdownFunction):
+ * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
+ * DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp: Added.
+ (NPDeallocateCalledBeforeNPShutdown::NPDeallocateCalledBeforeNPShutdown):
+ (NPDeallocateCalledBeforeNPShutdown::TestObject::~TestObject):
+ (NPDeallocateCalledBeforeNPShutdown::ScriptableObject::hasProperty):
+ (NPDeallocateCalledBeforeNPShutdown::ScriptableObject::getProperty):
+ (NPDeallocateCalledBeforeNPShutdown::NPP_New):
+ (NPDeallocateCalledBeforeNPShutdown::NPP_GetValue):
+ (NPDeallocateCalledBeforeNPShutdown::shutdown):
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NP_Shutdown):
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+ * GNUmakefile.am:
+
+2011-03-15 Ilya Sherman <isherman@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Autofilled form elements are assigned fixed background color but not text color
+ https://bugs.webkit.org/show_bug.cgi?id=48382
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (setAutofilledCallback): Added.
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::setAutofilled): Added.
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setAutofilled): Added.
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::setAutofilled): Added.
+ (LayoutTestController::setValueForUser): Style tweak.
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::setAutofilled): Added (stub).
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::setAutofilled): Added (stub).
+
+2011-03-15 Dan Bernstein <mitz@apple.com>
+
+ Build fix after r81135.
+
+ * TestWebKitAPI/Configurations/InjectedBundle.xcconfig:
+
+2011-03-15 Dan Bernstein <mitz@apple.com>
+
+ Build fix after r81135.
+
+ * WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
+ * WebKitTestRunner/mac/TestControllerMac.mm:
+ * WebKitTestRunner/mac/TestInvocationMac.mm:
+ * WebKitTestRunner/mac/main.mm:
+
+2011-03-15 Balazs Kelemen <kbalazs@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ REGRESSION(80977): breaks Qt ARMv7 Linux Release bot
+ https://bugs.webkit.org/show_bug.cgi?id=56349
+
+ * QtTestBrowser/QtTestBrowser.pro: Link against fontconfig
+ on platforms where we use it. Copied from DumpRenderTree.pro.
+
+2011-03-15 Dan Bernstein <mitz@apple.com>
+
+ Build fix after r81135.
+
+ * DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
+ * DumpRenderTree/mac/WebArchiveDumpSupportMac.mm:
+
+2011-03-15 Kevin Ollivier <kevino@theolliviers.com>
+
+ Reviewed by Darin Adler.
+
+ Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
+ info into the headers rather than in export symbol definition files, but disable it on
+ all platforms initially so we can deal with port build issues one port at a time.
+
+ https://bugs.webkit.org/show_bug.cgi?id=27551
+
+ * DumpRenderTree/cg/ImageDiffCG.cpp:
+ * DumpRenderTree/chromium/config.h:
+ * DumpRenderTree/config.h:
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ * TestWebKitAPI/TestWebKitAPIPrefix.h:
+ * WebKitAPITest/HostWindow.cpp:
+ * WebKitAPITest/TestsController.cpp:
+ * WebKitAPITest/config.h: Added.
+ * WebKitAPITest/main.cpp:
+ * WebKitAPITest/tests/WebViewDestruction.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp:
+ * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
+ * WebKitTestRunner/InjectedBundle/GCController.cpp:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ * WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp:
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
+ * WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
+ * WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp:
+ * WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp:
+ * WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp:
+ * WebKitTestRunner/TestController.cpp:
+ * WebKitTestRunner/TestInvocation.cpp:
+ * WebKitTestRunner/config.h: Added.
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ * WebKitTestRunner/qt/TestControllerQt.cpp:
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ * WebKitTestRunner/qt/main.cpp:
+ * WebKitTestRunner/win/PlatformWebViewWin.cpp:
+ * WebKitTestRunner/win/TestControllerWin.cpp:
+ * WebKitTestRunner/win/TestInvocationWin.cpp:
+ * WebKitTestRunner/win/main.cpp:
+ * wx/build/settings.py:
+
+2011-03-15 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Shinichiro Hamaji.
+
+ [NRWT] Add support for reftests to new-run-webkit-tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=55457
+
+ * Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_failures.py:
+ * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/dryrun.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/port/test_files.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py:
+
+2011-03-15 Alejandro G. Castro <alex@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Fix compilation warning after r80892
+ https://bugs.webkit.org/show_bug.cgi?id=56302
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::originsWithLocalStorage):
+
+2011-03-15 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Document the qmakearg argument, and hint how to build webkit2 on Qt
+ https://bugs.webkit.org/show_bug.cgi?id=56326
+
+ * Scripts/build-webkit: add --qmakearg to build-webkit --help
+
+2011-03-15 Adam Roben <aroben@apple.com>
+
+ Make Windows 7 Release (Tests) a core builder
+
+ We can probably make Windows XP Debug (Tests) a core builder, too, but we should probably
+ give it a few more days of greenness first.
+
+ Fixes <http://webkit.org/b/55665> Windows 7 Release (Tests) should be a core builder
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ (BuildBot): Added a regexp to match Windows 7 Release (Tests).
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+ (BuildBotTest): Updated the list of builders to match the current list on build.webkit.org.
+ Updated the core regexps to match the buildbot module. Updated the expected results to match
+ the current set of core builders.
+
+2011-03-14 Adam Roben <aroben@apple.com>
+
+ Add forgotten file from r81116
+
+ * TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops: Added.
+
+2011-03-14 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ about:blank fake responses don't get serialized when sent the UIProcess
+ <rdar://problem/9108119>
+ https://bugs.webkit.org/show_bug.cgi?id=56357
+
+ * TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp: Added.
+ (TestWebKitAPI::decidePolicyForResponse):
+ (TestWebKitAPI::TEST):
+ Add test that loads of about:blank have a response with a MIMEType of text/html.
+
+ * TestWebKitAPI/PlatformUtilities.h:
+ * TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
+ (TestWebKitAPI::Util::MIMETypeForWKURLResponse):
+ * TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
+ (TestWebKitAPI::Util::MIMETypeForWKURLResponse):
+ Add helper to get the MIMEType from a WKURLResponse.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+ Add new files.
+
+2011-03-14 Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Command-line options for QGLWidget and WebGL to QtTestBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=56006
+
+ * QtTestBrowser/launcherwindow.cpp:
+ (LauncherWindow::initializeView):
+ * QtTestBrowser/main.cpp:
+ (LauncherApplication::handleUserOptions):
+
+2011-03-14 James Kozianski <koz@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Add method to make BuildBot return test outputs
+ https://bugs.webkit.org/show_bug.cgi?id=54374
+
+ The Builder.latest_cached_build will be used by the new rebaseline
+ script to determine the build to use baselines from.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+
+2011-03-14 Adam Roben <aroben@apple.com>
+
+ Test that WKBundlePageCanHandleRequest returns true for empty document URLs
+
+ Reviewed by Sam Weinig.
+
+ * TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp: Added.
+ (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Store the result of the test.
+ (TestWebKitAPI::setInjectedBundleClient): Hook up our callback.
+ (TestWebKitAPI::TEST): Register "emptyscheme" as an empty document scheme, load a page to
+ ensure the web process is initialized, then ask the bundle to run the test and assert that
+ it succeeded.
+
+ * TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp: Added.
+ (TestWebKitAPI::CanHandleRequestTest::CanHandleRequestTest): Just call up to the base class.
+ (TestWebKitAPI::canHandleURL): Helper function to test whether WebKit2 claims to be able to
+ handle a given URL.
+ (TestWebKitAPI::runTest): Check that empty document URLs can be handled (and that an unknown
+ URL type cannot be handled).
+ (TestWebKitAPI::CanHandleRequestTest::didReceiveMessage): Run the test and return the
+ result.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+ * TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj:
+ Added new files to the project.
+
+2011-03-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r81094.
+ http://trac.webkit.org/changeset/81094
+ https://bugs.webkit.org/show_bug.cgi?id=56355
+
+ Broke the chromium DRT related build. (Requested by dave_levin
+ on #webkit).
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::layerTreeAsText):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::runFileTest):
+ (TestShell::dump):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestParams::TestParams):
+
+2011-03-14 Daniel Sievers <sievers@google.com>
+
+ Reviewed by Simon Fraser.
+
+ [Chromium] Make RenderAsTextBehavior and LayerTreeAsTextBehavior tweakable from the DumpRenderTree commandline
+ https://bugs.webkit.org/show_bug.cgi?id=56139
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::layerTreeAsText):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ (LayoutTestController::setShowDebugLayerTree):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::runFileTest):
+ (TestShell::dump):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestParams::TestParams):
+
+2011-03-14 Balazs Kelemen <kbalazs@webkit.org>
+
+ Reviewed by Adam Roben.
+
+ [Qt][WK2]Unbreak InjectedBundle on Qt
+ https://bugs.webkit.org/show_bug.cgi?id=54109
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::willSendRequestForFrame): Use new WebKit2
+ API's instead of KURL to analyze the URL.
+ * WebKitTestRunner/StringFunctions.h:
+ (WTR::adoptWK): Moved from InjectedBundlePage.cpp to make it available globally
+ in the WebKitTestRunner project.
+ (WTR::toWK): Use adoptWK.
+ (WTR::operator<<): Added helper for printing a WKURL.
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Do not link
+ against WebCore.
+
+2011-03-14 Balazs Kelemen <kbalazs@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ check-webkit-style falsely should not complain about WebKit2 API headers in the Shared directory
+ https://bugs.webkit.org/show_bug.cgi?id=56321
+
+ * Scripts/webkitpy/style/checker.py: Add the patch "Source/WebKit2/Shared/API/c"
+ to the list of exceptions for WebKit2 C API headers.
+
+2011-03-14 Adam Roben <aroben@apple.com>
+
+ Show the list of recent leaky builds in reverse chronological order
+
+ Previously they were being shown in a deterministic but surprising order based on
+ lexicographically sorting the build offsets (-1, -10, -2, -3...).
+
+ Fixes <http://webkit.org/b/56342> Leaks Viewer shows recent builds in a strange order
+
+ Reviewed by Darin Adler.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js:
+ (RecentBuildsLoader.prototype.start): Sort the builds by revision before passing them to our
+ callback.
+
+2011-03-14 Adam Roben <aroben@apple.com>
+
+ Show a list of up to 10 recent leaky builds when Leaks Viewer loads
+
+ Fixes <http://webkit.org/b/56043> Leaks Viewer should present a list of recent builds to
+ analyze
+
+ Reviewed by David Kilzer and Joe Pecoraro.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css:
+ (#url-prompt): Made this a bit taller to make room for the list of builds.
+
+ (#recent-builds-loading-indicator):
+ (#recent-builds-list):
+ Added styles for the build list and loading indicator.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js:
+ (LeaksViewer.loaded): Pass the URL from the query through decodeURIComponent before loading
+ it. This will unescape it.
+ (LeaksViewer.urlPromptButtonClicked): Moved code from here to _urlChosenFromPrompt.
+ (LeaksViewer._didLoadRecentBuilds): Added. Stores the builds and updates the prompt.
+ (LeaksViewer._displayURLPrompt): Start loading the recent leaky builds.
+ (LeaksViewer._updateURLPrompt): Create a list of the recent leaky builds and add them to the
+ prompt UI.
+ (LeaksViewer._urlChosenFromPrompt): Added. Code came from urlPromptButtonClicked. This is
+ now also used when a recent build is clicked.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js: Added.
+ (RecentBuildsLoader): Store the callback.
+ (RecentBuildsLoader.prototype.start): Load the N most recent builds from the specified
+ builder. Find the revision number, leak count, and results URL for each one. Pass the
+ resulting info to our callback.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js:
+ (range): Added this helper function to return an array containing the integers [0, n).
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html: Added
+ RecentBuildsLoader.js and added text to the prompt UI to show the recent builds.
+
+2011-03-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Fix two memory leaks within LayoutTestController's storage support.
+
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::originsWithLocalStorage): Don't leak the JSStringRef that is returned
+ by JSStringCreateWithCFString.
+ (LayoutTestController::deleteLocalStorageForOrigin): Don't leak the WebSecurityOrigin that we
+ allocate.
+
+2011-03-14 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ <http://webkit.org/b/56304> REGRESSION(r80892): 100,000+ leaks seen on the build bot
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::staticFunctions): Remove duplicate entries.
+
+2011-03-14 Alice Liu <alice.liu@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ DumpRenderTree Perl Support fails to build with ARCHS="i386 x86_64"
+
+ * DumpRenderTree/mac/PerlSupport/Makefile:
+ Add whitespace when joining "-arch" with the architectures passed in as arguments.
+
+2011-03-14 Daniel Bates <dbates@rim.com>
+
+ https://bugs.webkit.org/show_bug.cgi?id=55438
+ Add double quotes around value of -DCMAKE_WINCE_SDK that I inadvertently did not add
+ when landing changeset 81041 <http://trac.webkit.org/changeset/81041>.
+
+ * Scripts/build-webkit:
+
+2011-03-14 Daniel Bates <dbates@rim.com>
+
+ Reviewed by David Kilzer.
+
+ Cleanup: Separate port-specific implementation details from webkitdirs::buildCMakeProject()
+ https://bugs.webkit.org/show_bug.cgi?id=55438
+
+ Separate out the EFL- and WinCE-specific logic from the port-independent logic in
+ webkitdirs::buildCMakeProject(). Also, remove redundant code for generating the
+ CMake arguments for feature defines.
+
+ * Scripts/build-webkit:
+ - Added cMakeArgsFromFeatures() to convert the @features array to CMake arguments.
+ - Modified EFL and WinCE-specific building logic to call buildCMakeProjectOrExit().
+ - Sorted forward declarations.
+ - Initialize $makeArgs with the empty string so as to simplify its use in string operations;
+ Modified call sites as needed.
+ * Scripts/webkitdirs.pm:
+ - Added cleanCMakeGeneratedProject() to clean a CMake build.
+ - Added buildCMakeGeneratedProject() to build using generated build system.
+ - Added buildCMakeProjectOrExit() which is a facade for building a CMake project.
+ - Added generateBuildSystemFromCMakeProject() to generate the build system from
+ a CMake project.
+ - Removed buildCMakeProject(). This functionality is in buildCMakeProjectOrExit().
+
+2011-03-14 John Knottenbelt <jknotten@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Detach Geolocation from Frame when Page destroyed.
+ https://bugs.webkit.org/show_bug.cgi?id=52877
+
+ Extend the layout test controller to expose the number of pending
+ geolocation requests, so that we can test that the requests have
+ been cancelled on page close.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (numberOfPendingGeolocationPermissionRequestsCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/mac/UIDelegate.h:
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate numberOfPendingGeolocationPermissionRequests]):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+
+
+2011-03-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Unreviewed. Modify my email address in committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-03-13 Joe Wild <joseph.wild@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] QtLauncher does not load the same set of fonts as the DRT
+ https://bugs.webkit.org/show_bug.cgi?id=34959
+
+ This patch adds the option "-use-test-fonts" to the QtTestBrowser.
+ When this option is used the webkit fonts are loaded the same
+ as they are in DumpRenderTree. This option can be used on
+ QtTestBrowser and run-launcher. It can only be used
+ on Linux systems with FcInit and is configured as such.
+
+ * QtTestBrowser/launcherwindow.h:
+ (WindowOptions::WindowOptions):
+ * QtTestBrowser/main.cpp:
+ (initWebKitTestFonts):
+ (launcherMain):
+ (LauncherApplication::handleUserOptions):
+
+2011-03-12 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ <rdar://problem/8995822> Build DumpRenderTree perl support only for the architectures
+ DumpRenderTree is being built for.
+
+ * DumpRenderTree/mac/PerlSupport/Makefile:
+
+2011-03-12 Dan Bernstein <mitz@apple.com>
+
+ Suggested by Mark Rowe.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig: Leave C++ exceptions enabled
+ as they were before r80915.
+
+2011-03-12 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Should be able to download a PDF to the Downloads folder
+ https://bugs.webkit.org/show_bug.cgi?id=56256
+
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (-[BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createOtherPage):
+ (WTR::TestController::initialize):
+ Update for API changes.
+
+2011-03-11 Anton D'Auria <adauria@apple.com>
+
+ Reviewed and landed by Brady Eidson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=51878
+ Add WebKit1 API to view and delete local storage
+
+ Added tests that write to LocalStorage, delete one origin, get list of origins with local storage, delete all origins.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/LayoutTestController.cpp:
+ (syncLocalStorageCallback):
+ (observeStorageTrackerNotificationsCallback):
+ (deleteAllLocalStorageCallback):
+ (deleteLocalStorageForOriginCallback):
+ (originsWithLocalStorageCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/StorageTrackerDelegate.h: Added.
+ * DumpRenderTree/StorageTrackerDelegate.mm: Added.
+ (-[StorageTrackerDelegate init]):
+ (-[StorageTrackerDelegate logNotifications:controller:]):
+ (-[StorageTrackerDelegate originModified:]):
+ (-[StorageTrackerDelegate dealloc]):
+ (-[StorageTrackerDelegate setControllerToNotifyDone:]):
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::deleteAllLocalStorage):
+ (LayoutTestController::originsWithLocalStorage):
+ (LayoutTestController::deleteLocalStorageForOrigin):
+ (observeStorageTrackerNotifications):
+ (syncLocalStorage):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::originsWithLocalStorage):
+ (LayoutTestController::deleteAllLocalStorage):
+ (LayoutTestController::deleteLocalStorageForOrigin):
+ (LayoutTestController::observeStorageTrackerNotifications):
+ (LayoutTestController::syncLocalStorage):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+ (allocateGlobalControllers):
+ (releaseGlobalControllers):
+ * DumpRenderTree/mac/DumpRenderTreeMac.h:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::syncLocalStorage):
+ (LayoutTestController::observeStorageTrackerNotifications):
+ (LayoutTestController::deleteAllLocalStorage):
+ (LayoutTestController::originsWithLocalStorage):
+ (LayoutTestController::deleteLocalStorageForOrigin):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::originsWithLocalStorage):
+ (LayoutTestController::deleteAllLocalStorage):
+ (LayoutTestController::deleteLocalStorageForOrigin):
+ (LayoutTestController::observeStorageTrackerNotifications):
+ (LayoutTestController::syncLocalStorage):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::clearAllApplicationCaches):
+ (LayoutTestController::syncLocalStorage):
+ (LayoutTestController::observeStorageTrackerNotifications):
+ (LayoutTestController::clearAllDatabases):
+ (LayoutTestController::deleteAllLocalStorage):
+ (LayoutTestController::originsWithLocalStorage):
+ (LayoutTestController::deleteLocalStorageForOrigin):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::syncLocalStorage):
+ (LayoutTestController::observeStorageTrackerNotifications):
+ (LayoutTestController::clearAllDatabases):
+ (LayoutTestController::deleteAllLocalStorage):
+ (LayoutTestController::originsWithLocalStorage):
+ (LayoutTestController::deleteLocalStorageForOrigin):
+
+2011-03-11 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Crash calling WebContext::clearResourceCaches(InMemoryResourceCachesOnly) before the Web
+ Process has finished launching.
+ https://bugs.webkit.org/show_bug.cgi?id=56208
+
+ * TestWebKitAPI/Tests/WebKit2/SendingMessagesToTheWebProcessBeforeItIsValid.cpp: Added.
+ (TestWebKitAPI::TEST):
+ Test that calling WKContextClearResourceCaches works with both options when called before
+ the Web Process is valid.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ Add the new test.
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+ Ditto.
+
+2011-03-11 Adam Roben <aroben@apple.com>
+
+ Make it possible to view all leaks from a build at once in Leaks Viewer
+
+ You can now give Leaks Viewer the URL of a build results page (e.g.,
+ <http://build.webkit.org/results/SnowLeopard%20Intel%20Leaks/r80847%20(15493)/>), and it
+ will load all the leaks files from that build.
+
+ Fixes <http://webkit.org/b/56030> Leaks Viewer: Would like to be able to look at all leaks
+ files from a particular build at once, rather than one at a time
+
+ Reviewed by David Kilzer.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksLoader.js: Added.
+ (LeaksLoader): Initialize our properties.
+ (LeaksLoader.prototype.start): If the URL ends in .txt, assume it's a single leaks file and
+ load it. Otherwise assume it's a build results page URL and start fetching the leaks files
+ from that page.
+ (LeaksLoader.prototype._loadLeaksFiles): Tell our client how many leaks files we're loading
+ so it can provide feedback. Then load each one and pass it to the client.
+ (LeaksLoader.prototype._loadLeaksFromResultsPage): Load the HTML of the results page, parse
+ it into a DOM, pull out all the links to leaks files, and load each one.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParser.js: Added.
+ (LeaksParser): Initialize our worker.
+ (LeaksParser.prototype.addLeaksFile): Tell the worker about the leaks file's contents.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js: Added.
+ This code mostly came from Worker.js.
+ (LeaksParserWorker): Initialize our profile.
+ (LeaksParserWorker.prototype.addLeaksFile): Parse the leaks file and incorporate it into our
+ profile.
+ (LeaksParserWorker.prototype._parseLeaks):
+ (LeaksParserWorker.prototype._createNode):
+ (LeaksParserWorker.prototype._incorporateLeaks):
+ Moved these functions here from LeaksViewer. _incorporateLeaks is essentially just a renamed
+ version of createProfile which adds to this.profile instead of making a new profile each
+ time.
+ (onmessage): Parse the file and send back the new profile.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css:
+ (#loading-indicator):
+ (#spinner):
+ (#loading-indicator-label):
+ Tweaked styles to accomodate a longer label.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js:
+ (LeaksViewer.loaded): Set up a loader and parser.
+
+ (LeaksViewer.get filesLeftToParse):
+ (LeaksViewer.set filesLeftToParse):
+ Added these simple accessors.
+
+ (LeaksViewer._didCountLeaksFiles): Callback from LeaksLoader. Stores the count.
+ (LeaksViewer._didLoadLeaksFile): Callback from LeaksLoader. Passes the file contents off to
+ the parser.
+ (LeaksViewer._didParseLeaksFile): Callback from LeaksParser. If all files have been parsed,
+ tell the ProfilerAgent and mark that we're done loading. (Code came from the old
+ _loadLeaksFromURL function).
+ (LeaksViewer._loadLeaksFromURL): Now just calls through to the loader.
+ (LeaksViewer._loadingIndicatorText): Added. Returns the text that should show up in the
+ loading indicator, including the number of files being loaded.
+ (LeaksViewer._loadingStatusChanged): Update the loading indicator's label, too.
+ (LeaksViewer._updateLoadingIndicatorLabel): Added. Just updates the label!
+ (LeaksViewer._updateTitle): Moved code to compute the "Loading" text to
+ _loadingIndicatorText.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js: Added.
+ (getResource): Moved here from LeaksViewer.js.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Worker.js: Subsumed by
+ LeaksParserWorker.js.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html: Added new JS
+ files, added a #loading-indicator-label element, and tweaked the prompt wording.
+
+2011-03-11 Adam Roben <aroben@apple.com>
+
+ Don't trigger a build when build.webkit.org's HTML files are modified
+
+ Fixes <http://webkit.org/b/56190> Windows bots shouldn't have built r80848/r80851, but did
+
+ Reviewed by Dan Bernstein.
+
+ * Scripts/webkitpy/common/config/build.py:
+ (_should_file_trigger_build): Added build.webkit.org's public_html directory to the list of
+ directories that shouldn't trigger builds. Re-sorted the list.
+
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest): Added a test to cover the above change.
+
+2011-03-11 Adam Roben <aroben@apple.com>
+
+ Roll out r80848
+
+ It was accidentally committed.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js:
+ (LeaksViewer._loadLeaksFromURL):
+
+2011-03-11 Tony Chang <tony@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ kill hung lighttpd processes on the chromium win bot
+ https://bugs.webkit.org/show_bug.cgi?id=56152
+
+ Sometimes this process doesn't exit and it holds on to
+ a log file that we can't delete or copy, causing the tests
+ to go red.
+
+ * BuildSlaveSupport/win/kill-old-processes:
+
+2011-03-11 Ilya Sherman <isherman@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [Chromium] missing HTMLInputElement::setValueForUser() to tests
+ https://bugs.webkit.org/show_bug.cgi?id=55854
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::setValueForUser): Added.
+ * DumpRenderTree/chromium/LayoutTestController.h:
+
+2011-03-10 Peter Kasting <pkasting@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Clean up some gross code in TestShellWin.cpp. No functional change.
+ https://bugs.webkit.org/show_bug.cgi?id=56048
+
+ * DumpRenderTree/chromium/TestShellWin.cpp:
+ (checkLayoutTestSystemDependencies):
+
+2011-03-10 Keith Kyzivat <keith.kyzivat@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Buildfix for platforms where X11 is not available (e.g. Symbian)
+
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts): Guard X11-specific code with Q_WS_X11.
+
+2011-03-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Make single backing store the default for EWebLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=55753
+
+ Set single backing store the default for EWebLauncher.
+
+ * EWebLauncher/main.c:
+ (main):
+
+2011-03-10 Adam Roben <aroben@apple.com>
+
+ Ignore errors from files being held open when creating a test result archive
+
+ Fixes <http://webkit.org/b/55581> Test results don't get uploaded if test-result-archive
+ fails to delete the results directory
+
+ Reviewed by Mark Rowe.
+
+ * BuildSlaveSupport/test-result-archive:
+ (archiveTestResults): Ignore errno 2 when deleting the results directory, since it can be
+ thrown when a process is holding a file open.
+
+2011-03-10 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r80701.
+ http://trac.webkit.org/changeset/80701
+ https://bugs.webkit.org/show_bug.cgi?id=56126
+
+ fast/dom/Geolocation/window-close-crash.html fails on Snow
+ Leopard release builds (Requested by mihaip on #webkit).
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ * DumpRenderTree/mac/UIDelegate.h:
+ * DumpRenderTree/mac/UIDelegate.mm:
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+
+2011-03-10 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GTK] run-gtk-tests doesn't fail if a test crashes
+ https://bugs.webkit.org/show_bug.cgi?id=56089
+
+ * Scripts/run-gtk-tests: gtester -k exits with a 0 exit status
+ even if a test crashes. So run the tests individually and if a
+ test fails remember its exit code so run-gtk-test fails too, if
+ required.
+
+2011-01-26 John Knottenbelt <jknotten@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Detach Geolocation from Frame when Page destroyed.
+ https://bugs.webkit.org/show_bug.cgi?id=52877
+
+ Extend the layout test controller to expose the number of pending
+ geolocation requests, so that we can test that the requests have
+ been cancelled on page close.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (numberOfPendingGeolocationPermissionRequestsCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/mac/UIDelegate.h:
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate numberOfPendingGeolocationPermissionRequests]):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+ * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+ (LayoutTestController::numberOfPendingGeolocationPermissionRequests):
+
+
+2011-03-09 Adam Roben <aroben@apple.com>
+
+ Hide Leaks Viewer's URL prompt by default
+
+ We will show it as needed. I think I left it visible by default by accident after doing some
+ testing.
+
+ Fixes <http://webkit.org/b/56031> Leaks Viewer: URL prompt overlay shouldn't appear when a
+ URL is passed as a query parameter, but does
+
+ Reviewed by Simon Fraser.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html:
+
+2011-03-09 Adam Roben <aroben@apple.com>
+
+ Don't use Element.classList or box-shadow in Leaks Viewer
+
+ They aren't supported by Safari 5. Luckily we have substitutes for them!
+
+ Fixes <http://webkit.org/b/56035> Leaks viewer doesn't work in Safari 5
+
+ Reviewed by Simon Fraser.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css:
+ (#url-prompt): Use -webkit-box-shadow instead of box-shadow.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js:
+ (LeaksViewer.urlPromptButtonClicked):
+ (LeaksViewer._displayURLPrompt):
+ (LeaksViewer._setLoadingIndicatorHidden):
+ Use add/removeStyleClass (from utilities.js) instead of Element.classList.
+
+2011-03-09 Adam Roben <aroben@apple.com>
+
+ Add a link to the Leaks Viewer tool on the build.webkit.org homepage
+
+ Rubber-stamped by David Kilzer.
+
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2011-03-09 Adam Roben <aroben@apple.com>
+
+ Add a Leaks Viewer tool to build.webkit.org
+
+ This tool parses leaks from the files generated by the leaks bot and displays them in a
+ view similar to the Web Inspector's Profiles pane (in fact, it uses the Web Inspector's
+ code).
+
+ The URL of the leaks file can be entered in a prompt when the tools is first shown, or can
+ be passed to the tool via the "url" query parameter.
+
+ Only one leaks file can be viewed at a time for now. Only the number of leaks, as opposed to
+ the number of leaked bytes, is shown. And this tool has made apparent some bugs in the Web
+ Inspector's Heavy profile view. But it's still pretty useful as-is.
+
+ Fixes <http://webkit.org/b/56028> Would like a Shark-like tool for viewing leaks from leak bots
+
+ Reviewed by Darin Adler.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css: Added.
+ (#url-prompt-container): This is the dark overlay that is shown behind the URL prompt.
+ (#url-prompt): This is the prompt itself.
+
+ (#loading-indicator):
+ (#loading-indicator > img):
+ These show a spinner in the bottom-right when we're loading a leaks file.
+
+ (.percent-time-status-bar-item): Hide the Percent button since we never want to show leaks
+ as percentages.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js: Added.
+ (LeaksViewer.loaded): Initialize ourselves and start loading the leaks file (or prompt for a
+ URL if one wasn't given to us as a query parameter).
+
+ (LeaksViewer.get loading):
+ (LeaksViewer.set loading):
+ (LeaksViewer.get url):
+ (LeaksViewer.set url):
+ Pretty simple accessors.
+
+ (LeaksViewer.urlPromptButtonClicked): Start loading the URL from the prompt and hide the
+ prompt.
+ (LeaksViewer._displayURLPrompt): Show the prompt and focus the URL input.
+ (LeaksViewer._loadLeaksFromURL): Start fetching the leaks file. When we've retrieved the
+ file, hand it off to a Web Worker that will parse it into a fake "profile", then hand off
+ the profile to the Web Inspector code once it's been created.
+ (LeaksViewer._loadingStatusChanged): Update our loading indicator and title.
+ (LeaksViewer._setLoadingIndicatorHidden): Simply hide or show the indicator.
+ (LeaksViewer._updateTitle): Set our title based on our URL and loading status.
+ (getResource): Helper function to fetch a resource via XHR and pass it to a callback.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js: Added.
+ (WebInspector.UIString): Just a simple implementation since this tool isn't localized.
+ (ProfilerAgent.getProfile): Store the callback.
+ (ProfilerAgent.profileReady): Call the callback.
+ (monkeyPatchInspectorObjects): Fix up WebInspector.ProfileDataGridNode to show the self leak
+ count and total leak counts as real values, not percentages or milliseconds.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Worker.js: Added.
+ (onmessage): Create a profile based on the leaks file and pass it back to our caller.
+ (parseLeaks): Extract call stacks out of a leaks file.
+ (createNode): Helper function to create a new empty profile node.
+ (createProfile): Take the leak stacks and turn them into a fake "profile" for consumption by
+ WebInspector.ProfileView.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html: Added.
+
+2011-03-09 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Combine multiple --ignore-tests values
+ https://bugs.webkit.org/show_bug.cgi?id=56016
+
+ * Scripts/old-run-webkit-tests:
+
+2011-03-08 Kenji Imasaki <imasaki@chromium.org>
+
+ Reviewed by David Levin.
+
+ Adding myself to the committer file.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2011-03-08 Jessie Berlin <jberlin@apple.com>
+
+ Rubber-stamped by Adam Roben.
+
+ Fix two leaks I introduced into the API tests.
+
+ * TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp:
+ (TestWebKitAPI::TEST):
+
+2011-03-08 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ Crash in CFNetwork visiting google.com
+ https://bugs.webkit.org/show_bug.cgi?id=55958
+
+ Add a test for not trying to copy a null CFURLResponse.
+
+ * TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp: Added.
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+
+2011-03-08 Hayato Ito <hayato@chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ [NRWT] Renamed a FailureWithType class to a ComparisonTestFailure class.
+
+ FailureWithType is a confusing naming because we have removed test_type/* classes in r79840.
+
+ https://bugs.webkit.org/show_bug.cgi?id=55450
+
+ * Scripts/webkitpy/layout_tests/layout_package/test_failures.py:
+
+2011-03-08 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add layoutTestController.setValueForUser() after r80412
+ https://bugs.webkit.org/show_bug.cgi?id=55862
+
+ * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+ (LayoutTestController::setValueForUser): Implement setValueForUser()
+
+2011-03-08 Patrick Gansterer <paroga@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Add script_shell_command to WebKitPort
+ https://bugs.webkit.org/show_bug.cgi?id=55925
+
+ Add a central place where we generate the shell command from the script name.
+ This function will be used later to detect the correct script interpreter on Win32.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/tool/steps/abstractstep.py:
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+
+2011-03-07 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ add webkit-patch attach-to-bug for posting to bugzilla from the commandline
+ https://bugs.webkit.org/show_bug.cgi?id=55749
+
+ * Scripts/webkitpy/tool/commands/upload.py:
+ * Scripts/webkitpy/tool/commands/upload_unittest.py:
+ * Scripts/webkitpy/tool/steps/__init__.py:
+ * Scripts/webkitpy/tool/steps/attachtobug.py: Added.
+ * Scripts/webkitpy/tool/steps/options.py:
+
+2011-03-07 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add support for DataTransferItems
+ https://bugs.webkit.org/show_bug.cgi?id=55115
+
+ Enable data transfer items in DRT.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2011-03-06 Ojan Vafai <ojan@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [test dashboard] pull treemap files
+ https://bugs.webkit.org/show_bug.cgi?id=55852
+
+ * TestResultServer/handlers/dashboardhandler.py:
+
2011-03-03 Hayato Ito <hayato@chromium.org>
Reviewed by Mihai Parparita.
diff --git a/Tools/DumpRenderTree/DumpRenderTree.sln b/Tools/DumpRenderTree/DumpRenderTree.sln
index 1f7d803..df85a7c 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.sln
+++ b/Tools/DumpRenderTree/DumpRenderTree.sln
@@ -24,7 +24,7 @@ Global
Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32
Debug|Win32 = Debug|Win32
Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32
- Release_LTCG|Win32 = Release_LTCG|Win32
+ Production|Win32 = Production|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
@@ -36,8 +36,8 @@ Global
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Production|Win32.ActiveCfg = Production|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Production|Win32.Build.0 = Production|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
@@ -48,8 +48,8 @@ Global
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Production|Win32.ActiveCfg = Production|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Production|Win32.Build.0 = Production|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
@@ -60,8 +60,8 @@ Global
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Production|Win32.ActiveCfg = Production|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Production|Win32.Build.0 = Production|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
@@ -72,8 +72,8 @@ Global
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Production|Win32.ActiveCfg = Production|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Production|Win32.Build.0 = Production|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
diff --git a/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj b/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
index 000d83a..67a7556 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
+++ b/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
@@ -42,6 +42,7 @@
1AC6C84A0D07638600CD3161 /* PluginObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC6C7800D07589B00CD3161 /* PluginObject.cpp */; };
1AC6C84B0D07638600CD3161 /* TestObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC6C7810D07589B00CD3161 /* TestObject.cpp */; };
1AC77DCF120605B6005C19EF /* NPRuntimeRemoveProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */; };
+ 1ACF898D132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACF898B132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp */; };
1AD4CB2212A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD4CB2012A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp */; };
1AD9D2FE12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */; };
23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23BCB88F0EA57623003C6289 /* OpenGL.framework */; };
@@ -50,6 +51,8 @@
29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA2D12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm */; };
3713EDE2115BE19300705720 /* ColorBits-A.png in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 3713EDDF115BE16F00705720 /* ColorBits-A.png */; };
3713EDE3115BE19300705720 /* ColorBits.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 3713EDE0115BE16F00705720 /* ColorBits.ttf */; };
+ 3A5626CB131CA02A002BE6D9 /* StorageTrackerDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */; };
+ 3A5626CC131CA036002BE6D9 /* StorageTrackerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */; };
440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */; };
4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */; };
4437730F125CBC4D00AAE02C /* WebArchiveDumpSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */; };
@@ -212,6 +215,7 @@
1AC6C7800D07589B00CD3161 /* PluginObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginObject.cpp; sourceTree = "<group>"; };
1AC6C7810D07589B00CD3161 /* TestObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestObject.cpp; sourceTree = "<group>"; };
1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeRemoveProperty.cpp; sourceTree = "<group>"; };
+ 1ACF898B132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPDeallocateCalledBeforeNPShutdown.cpp; sourceTree = "<group>"; };
1AD4CB2012A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetUserAgentWithNullNPPFromNPPNew.cpp; sourceTree = "<group>"; };
1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginScriptableNPObjectInvokeDefault.cpp; sourceTree = "<group>"; };
23BCB88F0EA57623003C6289 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
@@ -230,6 +234,8 @@
375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = "<group>"; };
375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; };
375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
+ 3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageTrackerDelegate.h; sourceTree = "<group>"; };
+ 3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StorageTrackerDelegate.mm; sourceTree = "<group>"; };
440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = "<group>"; };
44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = "<group>"; };
44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = "<group>"; };
@@ -460,6 +466,8 @@
BCA18B5E0C9B08C200114369 /* ResourceLoadDelegate.mm */,
BCA18B5F0C9B08C200114369 /* UIDelegate.h */,
BCA18B600C9B08C200114369 /* UIDelegate.mm */,
+ 3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */,
+ 3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */,
);
name = Delegates;
sourceTree = "<group>";
@@ -471,6 +479,7 @@
C0E720741281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp */,
1A3E28A91311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp */,
1AD4CB2012A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp */,
+ 1ACF898B132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp */,
1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */,
1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */,
C0EC3C9B12787F0500939164 /* NullNPPGetValuePointer.cpp */,
@@ -620,6 +629,7 @@
5185F6B310714E12007AA393 /* HistoryDelegate.h in Headers */,
E1B7816711AF31C3007E1BC2 /* MockGeolocationProvider.h in Headers */,
29CFBA10122736E600BC30C0 /* AccessibilityTextMarker.h in Headers */,
+ 3A5626CC131CA036002BE6D9 /* StorageTrackerDelegate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -763,6 +773,7 @@
C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */,
1AD4CB2212A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp in Sources */,
1A3E28AA1311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp in Sources */,
+ 1ACF898D132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -809,6 +820,7 @@
E1B7816511AF31B7007E1BC2 /* MockGeolocationProvider.mm in Sources */,
29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */,
29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */,
+ 3A5626CB131CA02A002BE6D9 /* StorageTrackerDelegate.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/DumpRenderTree/ForwardingHeaders/wtf/OwnArrayPtr.h b/Tools/DumpRenderTree/ForwardingHeaders/wtf/OwnArrayPtr.h
new file mode 100644
index 0000000..595817d
--- /dev/null
+++ b/Tools/DumpRenderTree/ForwardingHeaders/wtf/OwnArrayPtr.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/OwnArrayPtr.h>
diff --git a/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h b/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h
new file mode 100644
index 0000000..48a54cc
--- /dev/null
+++ b/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/ThreadSafeRefCounted.h>
diff --git a/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h b/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h
deleted file mode 100644
index 4a7a77f..0000000
--- a/Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <JavaScriptCore/ThreadSafeShared.h>
diff --git a/Tools/DumpRenderTree/LayoutTestController.cpp b/Tools/DumpRenderTree/LayoutTestController.cpp
index 9f1877c..18b3dcd 100644
--- a/Tools/DumpRenderTree/LayoutTestController.cpp
+++ b/Tools/DumpRenderTree/LayoutTestController.cpp
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <wtf/Assertions.h>
#include <wtf/MathExtras.h>
+#include <wtf/OwnArrayPtr.h>
#include <wtf/RefPtr.h>
LayoutTestController::LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash)
@@ -355,15 +356,15 @@ static JSValueRef addURLToRedirectCallback(JSContextRef context, JSObjectRef fun
ASSERT(!*exception);
size_t maxLength = JSStringGetMaximumUTF8CStringSize(origin.get());
- char* originBuffer = new char[maxLength + 1];
- JSStringGetUTF8CString(origin.get(), originBuffer, maxLength + 1);
+ OwnArrayPtr<char> originBuffer = adoptArrayPtr(new char[maxLength + 1]);
+ JSStringGetUTF8CString(origin.get(), originBuffer.get(), maxLength + 1);
maxLength = JSStringGetMaximumUTF8CStringSize(destination.get());
- char* destinationBuffer = new char[maxLength + 1];
- JSStringGetUTF8CString(destination.get(), destinationBuffer, maxLength + 1);
+ OwnArrayPtr<char> destinationBuffer = adoptArrayPtr(new char[maxLength + 1]);
+ JSStringGetUTF8CString(destination.get(), destinationBuffer.get(), maxLength + 1);
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->addURLToRedirect(originBuffer, destinationBuffer);
+ controller->addURLToRedirect(originBuffer.get(), destinationBuffer.get());
return JSValueMakeUndefined(context);
}
@@ -385,6 +386,26 @@ static JSValueRef clearAllApplicationCachesCallback(JSContextRef context, JSObje
return JSValueMakeUndefined(context);
}
+static JSValueRef clearApplicationCacheForOriginCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> originURL(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->clearApplicationCacheForOrigin(originURL.get());
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef originsWithApplicationCacheCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return controller->originsWithApplicationCache(context);
+}
+
static JSValueRef clearAllDatabasesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac & windows implementation
@@ -394,6 +415,60 @@ static JSValueRef clearAllDatabasesCallback(JSContextRef context, JSObjectRef fu
return JSValueMakeUndefined(context);
}
+static JSValueRef syncLocalStorageCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+
+ controller->syncLocalStorage();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef observeStorageTrackerNotificationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ unsigned numNotifications = JSValueToNumber(context, arguments[0], exception);
+
+ ASSERT(!*exception);
+
+ controller->observeStorageTrackerNotifications(numNotifications);
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef deleteAllLocalStorageCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->deleteAllLocalStorage();
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef deleteLocalStorageForOriginCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ JSRetainPtr<JSStringRef> url(Adopt, JSValueToStringCopy(context, arguments[0], exception));
+ ASSERT(!*exception);
+
+ controller->deleteLocalStorageForOrigin(url.get());
+
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef originsWithLocalStorageCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return controller->originsWithLocalStorage(context);
+}
+
static JSValueRef clearBackForwardListCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac & windows implementation
@@ -769,6 +844,12 @@ static JSValueRef numberOfPagesCallback(JSContextRef context, JSObjectRef functi
return JSValueMakeNumber(context, controller->numberOfPages(pageWidthInPixels, pageHeightInPixels));
}
+static JSValueRef numberOfPendingGeolocationPermissionRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ return JSValueMakeNumber(context, controller->numberOfPendingGeolocationPermissionRequests());
+}
+
static JSValueRef pagePropertyCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
char* propertyName = 0;
@@ -1039,6 +1120,17 @@ 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);
+
+ LayoutTestController* controller = static_cast<LayoutTestController*>(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.
@@ -1472,11 +1564,11 @@ static JSValueRef setWillSendRequestClearHeaderCallback(JSContextRef context, JS
ASSERT(!*exception);
size_t maxLength = JSStringGetMaximumUTF8CStringSize(header.get());
- char* headerBuffer = new char[maxLength + 1];
- JSStringGetUTF8CString(header.get(), headerBuffer, maxLength + 1);
+ OwnArrayPtr<char> headerBuffer = adoptArrayPtr(new char[maxLength + 1]);
+ JSStringGetUTF8CString(header.get(), headerBuffer.get(), maxLength + 1);
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->setWillSendRequestClearHeader(headerBuffer);
+ controller->setWillSendRequestClearHeader(headerBuffer.get());
return JSValueMakeUndefined(context);
}
@@ -1871,6 +1963,19 @@ static JSValueRef hasSpellingMarkerCallback(JSContextRef context, JSObjectRef fu
return JSValueMakeBoolean(context, ok);
}
+static JSValueRef hasGrammarMarkerCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount != 2)
+ return JSValueMakeUndefined(context);
+
+ int from = JSValueToNumber(context, arguments[0], 0);
+ int length = JSValueToNumber(context, arguments[1], 0);
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ bool ok = controller->hasGrammarMarker(from, length);
+
+ return JSValueMakeBoolean(context, ok);
+}
+
static JSValueRef markerTextForListItemCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
@@ -2031,6 +2136,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "callShouldCloseOnWebView", callShouldCloseOnWebViewCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearAllApplicationCaches", clearAllApplicationCachesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearAllDatabases", clearAllDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "clearApplicationCacheForOrigin", clearApplicationCacheForOriginCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "closeWebInspector", closeWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2067,13 +2173,16 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "execCommand", execCommandCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "findString", findStringCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "counterValueForElementById", counterValueForElementByIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "originsWithApplicationCache", originsWithApplicationCacheCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "grantDesktopNotificationPermission", grantDesktopNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "hasSpellingMarker", hasSpellingMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "hasGrammarMarker", hasGrammarMarkerCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isCommandEnabled", isCommandEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isPageBoxVisible", isPageBoxVisibleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "keepWebHistory", keepWebHistoryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "layerTreeAsText", layerTreeAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "numberOfPages", numberOfPagesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "numberOfPendingGeolocationPermissionRequests", numberOfPendingGeolocationPermissionRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "markerTextForListItem", markerTextForListItemCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2107,6 +2216,7 @@ JSStaticFunction* LayoutTestController::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 },
@@ -2144,7 +2254,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "setUseDashboardCompatibilityMode", setUseDashboardCompatibilityModeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setUserStyleSheetEnabled", setUserStyleSheetEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setUserStyleSheetLocation", setUserStyleSheetLocationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setValueForUser", setValueForUserCallback, kJSPropertyAttributeDontDelete },
+ { "setValueForUser", setValueForUserCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setViewModeMediaFeature", setViewModeMediaFeatureCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setWebViewEditable", setWebViewEditableCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setWillSendRequestClearHeader", setWillSendRequestClearHeaderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2163,6 +2273,11 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "addOriginAccessWhitelistEntry", addOriginAccessWhitelistEntryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setScrollbarPolicy", setScrollbarPolicyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "authenticateSession", authenticateSessionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "deleteAllLocalStorage", deleteAllLocalStorageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "syncLocalStorage", syncLocalStorageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "observeStorageTrackerNotifications", observeStorageTrackerNotificationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "deleteLocalStorageForOrigin", deleteLocalStorageForOriginCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "originsWithLocalStorage", originsWithLocalStorageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setShouldPaintBrokenImage", setShouldPaintBrokenImageCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ 0, 0, 0 }
};
diff --git a/Tools/DumpRenderTree/LayoutTestController.h b/Tools/DumpRenderTree/LayoutTestController.h
index 4b1c04e..4a6e59c 100644
--- a/Tools/DumpRenderTree/LayoutTestController.h
+++ b/Tools/DumpRenderTree/LayoutTestController.h
@@ -50,6 +50,7 @@ public:
const std::string& redirectionDestinationForURL(std::string);
void clearAllApplicationCaches();
void clearAllDatabases();
+ void clearApplicationCacheForOrigin(JSStringRef name);
void clearBackForwardList();
void clearPersistentUserStyleSheet();
bool callShouldCloseOnWebView();
@@ -62,12 +63,14 @@ public:
void displayInvalidatedRegion();
void execCommand(JSStringRef name, JSStringRef value);
bool findString(JSContextRef, JSStringRef, JSObjectRef optionsArray);
+ JSValueRef originsWithApplicationCache(JSContextRef);
bool isCommandEnabled(JSStringRef name);
void keepWebHistory();
JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);
JSValueRef nodesFromRect(JSContextRef, JSValueRef, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping);
void notifyDone();
int numberOfPages(float pageWidthInPixels, float pageHeightInPixels);
+ int numberOfPendingGeolocationPermissionRequests();
void overridePreference(JSStringRef key, JSStringRef value);
int pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels);
JSRetainPtr<JSStringRef> pageProperty(const char* propertyName, int pageNumber) const;
@@ -89,6 +92,7 @@ public:
void setAppCacheMaximumSize(unsigned long long quota);
void setApplicationCacheOriginQuota(unsigned long long quota);
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);
@@ -291,6 +295,7 @@ public:
void abortModal();
bool hasSpellingMarker(int from, int length);
+ bool hasGrammarMarker(int from, int length);
void dumpConfigurationForViewport(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight);
@@ -308,6 +313,12 @@ public:
JSRetainPtr<JSStringRef> markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const;
+ JSValueRef originsWithLocalStorage(JSContextRef);
+ void deleteAllLocalStorage();
+ void deleteLocalStorageForOrigin(JSStringRef originIdentifier);
+ void observeStorageTrackerNotifications(unsigned number);
+ void syncLocalStorage();
+
void setShouldPaintBrokenImage(bool);
bool shouldPaintBrokenImage() const { return m_shouldPaintBrokenImage; }
diff --git a/Tools/DumpRenderTree/StorageTrackerDelegate.h b/Tools/DumpRenderTree/StorageTrackerDelegate.h
new file mode 100644
index 0000000..e025a44
--- /dev/null
+++ b/Tools/DumpRenderTree/StorageTrackerDelegate.h
@@ -0,0 +1,37 @@
+/*
+ * 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. ``AS IS'' AND ANY
+ * EXPRESS OR 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.
+ */
+
+class LayoutTestController;
+
+@interface StorageTrackerDelegate : NSObject {
+ unsigned numberOfNotificationsToLog;
+ LayoutTestController* controllerToNotifyDone;
+}
+
+- (void)logNotifications:(unsigned)number controller:(LayoutTestController*)controller;
+- (void)originModified:(NSNotification *)notification;
+- (void)setControllerToNotifyDone:(LayoutTestController*)controller;
+
+@end
diff --git a/Tools/DumpRenderTree/StorageTrackerDelegate.mm b/Tools/DumpRenderTree/StorageTrackerDelegate.mm
new file mode 100644
index 0000000..343880b
--- /dev/null
+++ b/Tools/DumpRenderTree/StorageTrackerDelegate.mm
@@ -0,0 +1,82 @@
+/*
+ * 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. ``AS IS'' AND ANY
+ * EXPRESS OR 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 "StorageTrackerDelegate.h"
+
+#import "LayoutTestController.h"
+#import <WebKit/WebSecurityOriginPrivate.h>
+#import <WebKit/WebStorageManagerPrivate.h>
+
+@implementation StorageTrackerDelegate
+
+- (id)init
+{
+ self = [super init];
+ if (!self)
+ return nil;
+
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(originModified:) name:WebStorageDidModifyOriginNotification object:nil];
+
+ return self;
+}
+
+- (void)logNotifications:(unsigned)number controller:(LayoutTestController*)controller
+{
+ controllerToNotifyDone = controller;
+
+ numberOfNotificationsToLog = number;
+}
+
+- (void)originModified:(NSNotification *)notification
+{
+ if (!numberOfNotificationsToLog)
+ return;
+
+ numberOfNotificationsToLog--;
+
+ if (numberOfNotificationsToLog == 0 && controllerToNotifyDone) {
+ NSArray *origins = [[WebStorageManager sharedWebStorageManager] origins];
+ for (WebSecurityOrigin *origin in origins)
+ printf("Origin identifier: '%s'\n", [[origin databaseIdentifier] UTF8String]);
+
+ controllerToNotifyDone->notifyDone();
+ }
+}
+
+- (void)dealloc
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self name:WebStorageDidModifyOriginNotification object:nil];
+
+ [super dealloc];
+}
+
+- (void)setControllerToNotifyDone:(LayoutTestController*)controller
+{
+ controllerToNotifyDone = controller;
+}
+
+
+@end
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
index 23120c4..98ef799 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp
@@ -31,6 +31,8 @@
using namespace std;
extern NPNetscapeFuncs *browser;
+static void (*shutdownFunction)();
+
PluginTest* PluginTest::create(NPP npp, const string& identifier)
{
if (identifier.empty())
@@ -47,12 +49,26 @@ PluginTest::PluginTest(NPP npp, const string& identifier)
: m_npp(npp)
, m_identifier(identifier)
{
+ // Reset the shutdown function.
+ shutdownFunction = 0;
}
PluginTest::~PluginTest()
{
}
+void PluginTest::NP_Shutdown()
+{
+ if (shutdownFunction)
+ shutdownFunction();
+}
+
+void PluginTest::registerNPShutdownFunction(void (*func)())
+{
+ assert(!shutdownFunction);
+ shutdownFunction = func;
+}
+
NPError PluginTest::NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)
{
return NPERR_NO_ERROR;
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h b/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
index 7c3a53e..cf94165 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h
@@ -54,6 +54,8 @@ public:
static PluginTest* create(NPP, const std::string& identifier);
virtual ~PluginTest();
+ static void NP_Shutdown();
+
// NPP functions.
virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved);
virtual NPError NPP_Destroy(NPSavedData**);
@@ -74,6 +76,8 @@ public:
void executeScript(const char*);
+ void registerNPShutdownFunction(void (*)());
+
template<typename TestClassTy> class Register {
public:
Register(const std::string& identifier)
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp
new file mode 100644
index 0000000..c53ec97
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp
@@ -0,0 +1,102 @@
+/*
+ * 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 "PluginTest.h"
+
+using namespace std;
+
+static bool wasShutdownCalled = false;
+
+class NPDeallocateCalledBeforeNPShutdown : public PluginTest {
+public:
+ NPDeallocateCalledBeforeNPShutdown(NPP npp, const string& identifier)
+ : PluginTest(npp, identifier)
+ {
+ }
+
+private:
+ // This is the test object.
+ class TestObject : public Object<TestObject> {
+ public:
+ ~TestObject()
+ {
+ // This should really be an assert, but there's no way for the test framework
+ // to know that the plug-in process crashed, so we'll just sleep for a while
+ // to ensure that the test times out.
+ if (wasShutdownCalled) {
+#if defined(XP_WIN)
+ ::Sleep(100000);
+#else
+ sleep(1000);
+#endif
+ }
+ }
+ };
+
+ // This is the scriptable object. It has a single "testObject" property.
+ class ScriptableObject : public Object<ScriptableObject> {
+ public:
+ bool hasProperty(NPIdentifier propertyName)
+ {
+ return propertyName == pluginTest()->NPN_GetStringIdentifier("testObject");
+ }
+
+ bool getProperty(NPIdentifier propertyName, NPVariant* result)
+ {
+ if (propertyName != pluginTest()->NPN_GetStringIdentifier("testObject"))
+ return false;
+
+ NPObject* testObject = TestObject::create(pluginTest());
+ OBJECT_TO_NPVARIANT(testObject, *result);
+ return true;
+ }
+ };
+
+ virtual NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)
+ {
+ registerNPShutdownFunction(shutdown);
+
+ return NPERR_NO_ERROR;
+ }
+
+ 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 void shutdown()
+ {
+ wasShutdownCalled = true;
+ }
+
+};
+
+static PluginTest::Register<NPDeallocateCalledBeforeNPShutdown> npRuntimeObjectFromDestroyedPlugin("np-deallocate-called-before-np-shutdown");
+
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/mac/Info.plist b/Tools/DumpRenderTree/TestNetscapePlugIn/mac/Info.plist
index 7444b84..ef45e66 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/mac/Info.plist
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/mac/Info.plist
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
@@ -44,6 +44,15 @@
<string>Simple Netscape plug-in that handles test content for WebKit</string>
<key>WebPluginMIMETypes</key>
<dict>
+ <key>image/png</key>
+ <dict>
+ <key>WebPluginExtensions</key>
+ <array>
+ <string>png</string>
+ </array>
+ <key>WebPluginTypeDescription</key>
+ <string>PNG image</string>
+ </dict>
<key>application/x-webkit-test-netscape</key>
<dict>
<key>WebPluginExtensions</key>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
index b523fcb..a090fef 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
@@ -123,6 +123,7 @@ NPError STDCALL NP_GetEntryPoints(NPPluginFuncs *pluginFuncs)
extern "C"
void STDCALL NP_Shutdown(void)
{
+ PluginTest::NP_Shutdown();
}
static void executeScript(const PluginObject* obj, const char* script);
@@ -786,7 +787,7 @@ NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
extern "C"
const char* NP_GetMIMEDescription(void)
{
- return "application/x-webkit-test-netscape:testnetscape:test netscape content";
+ return "application/x-webkit-test-netscape:testnetscape:test netscape content;image/png:png:PNG image";
}
extern "C"
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc
index 5a02f9d..c0b38ee 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc
@@ -71,10 +71,10 @@ BEGIN
BEGIN
VALUE "CompanyName", "Apple Inc."
VALUE "FileDescription", "Simple Netscape plug-in that handles test content for WebKit"
- VALUE "FileExtents", "testnetscape"
- VALUE "FileOpenName", "test netscape content"
+ 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"
+ VALUE "MIMEType", "application/x-webkit-test-netscape|image/png"
VALUE "OriginalFilename", "npTestNetscapePlugin.dll"
VALUE "ProductName", "WebKit Test PlugIn"
END
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
index 58a0a1f..5856985 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\TestNetscapePluginCommon.vsprops"
+ InheritedPropertySheets=".\TestNetscapePluginDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\TestNetscapePluginCommon.vsprops"
+ InheritedPropertySheets=".\TestNetscapePluginRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -140,7 +140,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="2"
- 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"
+ InheritedPropertySheets=".\TestNetscapePluginDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -201,7 +201,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="2"
- 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"
+ InheritedPropertySheets=".\TestNetscapePluginDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -260,9 +260,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\TestNetscapePluginCommon.vsprops"
+ InheritedPropertySheets=".\TestNetscapePluginProduction.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -324,7 +324,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\TestNetscapePluginCommon.vsprops"
+ InheritedPropertySheets=".\TestNetscapePluginReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -406,6 +406,10 @@
>
</File>
<File
+ RelativePath="..\Tests\NPDeallocateCalledBeforeNPShutdown.cpp"
+ >
+ </File>
+ <File
RelativePath="..\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp"
>
</File>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops
new file mode 100644
index 0000000..a12fcb5
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops
@@ -0,0 +1,11 @@
+<?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
new file mode 100644
index 0000000..b29989a
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..dd258f0
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..4a65c62
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops
@@ -0,0 +1,12 @@
+<?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\release.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
new file mode 100644
index 0000000..c410e11
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops
@@ -0,0 +1,11 @@
+<?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\release.vsprops;
+ .\TestNetscapePluginCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..eb51008
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\TestNetscapePluginCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp b/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
index 4d77454..81d3e39 100644
--- a/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
+++ b/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
@@ -23,11 +23,12 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "WebArchiveDumpSupport.h"
+#include "config.h"
+#include "WebArchiveDumpSupport.h"
-#import <CoreFoundation/CoreFoundation.h>
-#import <CFNetwork/CFNetwork.h>
-#import <wtf/RetainPtr.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <CFNetwork/CFNetwork.h>
+#include <wtf/RetainPtr.h>
extern "C" {
diff --git a/Tools/DumpRenderTree/cg/ImageDiffCG.cpp b/Tools/DumpRenderTree/cg/ImageDiffCG.cpp
index 593ba64..b4f432f 100644
--- a/Tools/DumpRenderTree/cg/ImageDiffCG.cpp
+++ b/Tools/DumpRenderTree/cg/ImageDiffCG.cpp
@@ -26,6 +26,10 @@
#define min min
+// FIXME: We need to be able to include these defines from a config.h somewhere.
+#define JS_EXPORT_PRIVATE
+#define WTF_EXPORT_PRIVATE
+
#include <stdio.h>
#include <wtf/Platform.h>
#include <wtf/RetainPtr.h>
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
index 76aa781..61e726a 100644
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
+++ b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
@@ -72,11 +72,6 @@ void DRTDevToolsAgent::runtimePropertyChanged(const WebString& name, const WebSt
// FIXME: Implement.
}
-WebCString DRTDevToolsAgent::debuggerScriptSource()
-{
- return webkit_support::GetDevToolsDebuggerScriptSource();
-}
-
WebDevToolsAgentClient::WebKitClientMessageLoop* DRTDevToolsAgent::createClientMessageLoop()
{
return webkit_support::CreateDevToolsMessageLoop();
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h
index 4cbc8bc..0ecf61b 100644
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h
+++ b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h
@@ -61,7 +61,6 @@ public:
virtual void sendMessageToInspectorFrontend(const WebKit::WebString&);
virtual int hostIdentifier() { return m_routingID; }
virtual void runtimePropertyChanged(const WebKit::WebString& name, const WebKit::WebString& value);
- virtual WebKit::WebCString debuggerScriptSource();
virtual WebKitClientMessageLoop* createClientMessageLoop();
void asyncCall(const WebKit::WebString& args);
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
index e008432..95fcd58 100644
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -43,7 +43,8 @@ static const char optionDumpAllPixels[] = "--dump-all-pixels";
static const char optionNotree[] = "--notree";
static const char optionPixelTests[] = "--pixel-tests";
static const char optionThreaded[] = "--threaded";
-static const char optionTree[] = "--tree";
+static const char optionDebugRenderTree[] = "--debug-render-tree";
+static const char optionDebugLayerTree[] = "--debug-layer-tree";
static const char optionPixelTestsWithName[] = "--pixel-tests=";
static const char optionTestShell[] = "--test-shell";
@@ -53,6 +54,7 @@ static const char optionCheckLayoutTestSystemDeps[] = "--check-layout-test-sys-d
static const char optionHardwareAcceleratedGL[] = "--enable-hardware-gpu";
static const char optionEnableAcceleratedCompositing[] = "--enable-accelerated-compositing";
+static const char optionForceCompositingMode[] = "--force-compositing-mode";
static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
static const char optionStressOpt[] = "--stress-opt";
@@ -131,6 +133,7 @@ int main(int argc, char* argv[])
bool allowExternalPages = false;
bool startupDialog = false;
bool acceleratedCompositingEnabled = false;
+ bool forceCompositingMode = false;
bool accelerated2DCanvasEnabled = false;
bool stressOpt = false;
bool stressDeopt = false;
@@ -148,7 +151,11 @@ int main(int argc, char* argv[])
else if (!argument.find(optionPixelTestsWithName)) {
params.dumpPixels = true;
params.pixelFileName = argument.substr(strlen(optionPixelTestsWithName));
- } else if (argument == optionTestShell) {
+ } else if (argument == optionDebugRenderTree)
+ params.debugRenderTree = true;
+ else if (argument == optionDebugLayerTree)
+ params.debugLayerTree = true;
+ else if (argument == optionTestShell) {
testShellMode = true;
serverMode = true;
} else if (argument == optionAllowExternalPages)
@@ -161,6 +168,8 @@ int main(int argc, char* argv[])
hardwareAcceleratedGL = true;
else if (argument == optionEnableAcceleratedCompositing)
acceleratedCompositingEnabled = true;
+ else if (argument == optionForceCompositingMode)
+ forceCompositingMode = true;
else if (argument == optionEnableAccelerated2DCanvas)
accelerated2DCanvasEnabled = true;
else if (argument == optionStressOpt)
@@ -194,6 +203,7 @@ int main(int argc, char* argv[])
TestShell shell(testShellMode);
shell.setAllowExternalPages(allowExternalPages);
shell.setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
+ shell.setForceCompositingMode(forceCompositingMode);
shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
shell.setJavaScriptFlags(javaScriptFlags);
shell.setStressOpt(stressOpt);
diff --git a/Tools/DumpRenderTree/chromium/EventSender.cpp b/Tools/DumpRenderTree/chromium/EventSender.cpp
index c5b7aa9..c800c43 100644
--- a/Tools/DumpRenderTree/chromium/EventSender.cpp
+++ b/Tools/DumpRenderTree/chromium/EventSender.cpp
@@ -338,7 +338,7 @@ void EventSender::doDragDrop(const WebDragData& dragData, WebDragOperationsMask
WebPoint screenPoint(event.globalX, event.globalY);
currentDragData = dragData;
currentDragEffectsAllowed = mask;
- currentDragEffect = webview()->dragTargetDragEnter(dragData, 0, clientPoint, screenPoint, currentDragEffectsAllowed);
+ currentDragEffect = webview()->dragTargetDragEnter(dragData, clientPoint, screenPoint, currentDragEffectsAllowed);
// Finish processing events.
replaySavedEvents();
@@ -826,7 +826,7 @@ void EventSender::beginDragWithFiles(const CppArgumentList& arguments, CppVarian
currentDragEffectsAllowed = WebKit::WebDragOperationCopy;
// Provide a drag source.
- webview()->dragTargetDragEnter(currentDragData, 0, lastMousePos, lastMousePos, currentDragEffectsAllowed);
+ webview()->dragTargetDragEnter(currentDragData, lastMousePos, lastMousePos, currentDragEffectsAllowed);
// dragMode saves events and then replays them later. We don't need/want that.
dragMode.set(false);
diff --git a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
index b891d1e..d91cd6e 100644
--- a/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -73,6 +73,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
: m_shell(shell)
, m_closeRemainingWindows(false)
, m_deferMainResourceDataLoad(false)
+ , m_showDebugLayerTree(false)
, m_workQueue(this)
{
@@ -108,13 +109,14 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("evaluateScriptInIsolatedWorld", &LayoutTestController::evaluateScriptInIsolatedWorld);
bindMethod("execCommand", &LayoutTestController::execCommand);
bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission);
+ bindMethod("hasSpellingMarker", &LayoutTestController::hasSpellingMarker);
bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled);
bindMethod("layerTreeAsText", &LayoutTestController::layerTreeAsText);
bindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem);
- bindMethod("hasSpellingMarker", &LayoutTestController::hasSpellingMarker);
bindMethod("notifyDone", &LayoutTestController::notifyDone);
bindMethod("numberOfActiveAnimations", &LayoutTestController::numberOfActiveAnimations);
bindMethod("numberOfPages", &LayoutTestController::numberOfPages);
+ bindMethod("numberOfPendingGeolocationPermissionRequests", &LayoutTestController:: numberOfPendingGeolocationPermissionRequests);
bindMethod("objCIdentityIsEqual", &LayoutTestController::objCIdentityIsEqual);
bindMethod("overridePreference", &LayoutTestController::overridePreference);
bindMethod("pageNumberForElementById", &LayoutTestController::pageNumberForElementById);
@@ -137,6 +139,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("setAllowUniversalAccessFromFileURLs", &LayoutTestController::setAllowUniversalAccessFromFileURLs);
bindMethod("setAlwaysAcceptCookies", &LayoutTestController::setAlwaysAcceptCookies);
bindMethod("setAuthorAndUserStylesEnabled", &LayoutTestController::setAuthorAndUserStylesEnabled);
+ bindMethod("setAutofilled", &LayoutTestController::setAutofilled);
bindMethod("setCanOpenWindows", &LayoutTestController::setCanOpenWindows);
bindMethod("setCloseRemainingWindowsWhenComplete", &LayoutTestController::setCloseRemainingWindowsWhenComplete);
bindMethod("setCustomPolicyDelegate", &LayoutTestController::setCustomPolicyDelegate);
@@ -152,6 +155,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("setMockGeolocationError", &LayoutTestController::setMockGeolocationError);
bindMethod("setMockGeolocationPosition", &LayoutTestController::setMockGeolocationPosition);
bindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult);
+ bindMethod("setPluginsEnabled", &LayoutTestController::setPluginsEnabled);
bindMethod("setPopupBlockingEnabled", &LayoutTestController::setPopupBlockingEnabled);
bindMethod("setPOSIXLocale", &LayoutTestController::setPOSIXLocale);
bindMethod("setScrollbarPolicy", &LayoutTestController::setScrollbarPolicy);
@@ -162,12 +166,14 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("setTimelineProfilingEnabled", &LayoutTestController::setTimelineProfilingEnabled);
bindMethod("setUserStyleSheetEnabled", &LayoutTestController::setUserStyleSheetEnabled);
bindMethod("setUserStyleSheetLocation", &LayoutTestController::setUserStyleSheetLocation);
+ bindMethod("setValueForUser", &LayoutTestController::setValueForUser);
bindMethod("setWillSendRequestClearHeader", &LayoutTestController::setWillSendRequestClearHeader);
bindMethod("setWillSendRequestReturnsNull", &LayoutTestController::setWillSendRequestReturnsNull);
bindMethod("setWillSendRequestReturnsNullOnRedirect", &LayoutTestController::setWillSendRequestReturnsNullOnRedirect);
bindMethod("setWindowIsKey", &LayoutTestController::setWindowIsKey);
bindMethod("setXSSAuditorEnabled", &LayoutTestController::setXSSAuditorEnabled);
bindMethod("setAsynchronousSpellCheckingEnabled", &LayoutTestController::setAsynchronousSpellCheckingEnabled);
+ bindMethod("shadowRoot", &LayoutTestController::shadowRoot);
bindMethod("showWebInspector", &LayoutTestController::showWebInspector);
bindMethod("simulateDesktopNotificationClick", &LayoutTestController::simulateDesktopNotificationClick);
bindMethod("suspendAnimations", &LayoutTestController::suspendAnimations);
@@ -182,6 +188,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("addDisallowedURL", &LayoutTestController::addDisallowedURL);
bindMethod("callShouldCloseOnWebView", &LayoutTestController::callShouldCloseOnWebView);
bindMethod("clearAllApplicationCaches", &LayoutTestController::clearAllApplicationCaches);
+ bindMethod("clearApplicationCacheForOrigin", &LayoutTestController::clearApplicationCacheForOrigin);
bindMethod("clearBackForwardList", &LayoutTestController::clearBackForwardList);
bindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive);
bindMethod("keepWebHistory", &LayoutTestController::keepWebHistory);
@@ -192,7 +199,12 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("setPrivateBrowsingEnabled", &LayoutTestController::setPrivateBrowsingEnabled);
bindMethod("setUseDashboardCompatibilityMode", &LayoutTestController::setUseDashboardCompatibilityMode);
bindMethod("storeWebScriptObject", &LayoutTestController::storeWebScriptObject);
-
+ bindMethod("deleteAllLocalStorage", &LayoutTestController::deleteAllLocalStorage);
+ bindMethod("originsWithLocalStorage", &LayoutTestController::originsWithLocalStorage);
+ bindMethod("deleteLocalStorageForOrigin", &LayoutTestController::deleteLocalStorageForOrigin);
+ bindMethod("observeStorageTrackerNotifications", &LayoutTestController::observeStorageTrackerNotifications);
+ bindMethod("syncLocalStorage", &LayoutTestController::syncLocalStorage);
+
// The fallback method is called when an unknown method is invoked.
bindFallbackMethod(&LayoutTestController::fallbackMethod);
@@ -636,6 +648,28 @@ void LayoutTestController::setAsynchronousSpellCheckingEnabled(const CppArgument
result->setNull();
}
+void LayoutTestController::shadowRoot(const CppArgumentList& arguments, CppVariant* result)
+{
+ if (arguments.size() != 1 || !arguments[0].isObject()) {
+ result->setNull();
+ return;
+ }
+
+ WebElement element;
+ if (!WebBindings::getElement(arguments[0].value.objectValue, &element)) {
+ result->setNull();
+ return;
+ }
+
+ WebNode shadowRoot = element.shadowRoot();
+ if (shadowRoot.isNull()) {
+ result->setNull();
+ return;
+ }
+
+ result->set(WebBindings::makeNode(shadowRoot));
+}
+
void LayoutTestController::showWebInspector(const CppArgumentList&, CppVariant* result)
{
m_shell->showDevTools();
@@ -731,13 +765,25 @@ void LayoutTestController::setUseDashboardCompatibilityMode(const CppArgumentLis
void LayoutTestController::clearAllApplicationCaches(const CppArgumentList&, CppVariant* result)
{
- // FIXME: implement to support Application Cache Quotas.
+ // FIXME: Implement to support application cache quotas.
+ result->setNull();
+}
+
+void LayoutTestController::clearApplicationCacheForOrigin(const CppArgumentList&, CppVariant* result)
+{
+ // FIXME: Implement to support deleting all application cache for an origin.
result->setNull();
}
void LayoutTestController::setApplicationCacheOriginQuota(const CppArgumentList&, CppVariant* result)
{
- // FIXME: implement to support Application Cache Quotas.
+ // FIXME: Implement to support application cache quotas.
+ result->setNull();
+}
+
+void LayoutTestController::originsWithApplicationCache(const CppArgumentList&, CppVariant* result)
+{
+ // FIXME: Implement to support getting origins that have application caches.
result->setNull();
}
@@ -1452,6 +1498,16 @@ void LayoutTestController::numberOfPages(const CppArgumentList& arguments, CppVa
result->set(numberOfPages);
}
+void LayoutTestController::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 LayoutTestController::logErrorToConsole(const std::string& text)
{
m_shell->webViewHost()->didAddMessageToConsole(
@@ -1576,7 +1632,7 @@ void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& argum
void LayoutTestController::layerTreeAsText(const CppArgumentList& args, CppVariant* result)
{
- result->set(m_shell->webView()->mainFrame()->layerTreeAsText().utf8());
+ result->set(m_shell->webView()->mainFrame()->layerTreeAsText(m_showDebugLayerTree).utf8());
}
void LayoutTestController::markerTextForListItem(const CppArgumentList& args, CppVariant* result)
@@ -1602,3 +1658,71 @@ void LayoutTestController::setMinimumTimerInterval(const CppArgumentList& argume
return;
m_shell->webView()->settings()->setMinimumTimerInterval(arguments[0].toDouble());
}
+
+void LayoutTestController::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 LayoutTestController::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 LayoutTestController::deleteAllLocalStorage(const CppArgumentList& arguments, CppVariant*)
+{
+ // Not Implemented
+}
+
+void LayoutTestController::originsWithLocalStorage(const CppArgumentList& arguments, CppVariant*)
+{
+ // Not Implemented
+}
+
+void LayoutTestController::deleteLocalStorageForOrigin(const CppArgumentList& arguments, CppVariant*)
+{
+ // Not Implemented
+}
+
+void LayoutTestController::observeStorageTrackerNotifications(const CppArgumentList&, CppVariant*)
+{
+ // Not Implemented
+}
+
+void LayoutTestController::syncLocalStorage(const CppArgumentList&, CppVariant*)
+{
+ // Not Implemented
+}
+
+void LayoutTestController::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();
+}
diff --git a/Tools/DumpRenderTree/chromium/LayoutTestController.h b/Tools/DumpRenderTree/chromium/LayoutTestController.h
index 6150133..a9c6ce4 100644
--- a/Tools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/Tools/DumpRenderTree/chromium/LayoutTestController.h
@@ -270,6 +270,7 @@ public:
void setAllowUniversalAccessFromFileURLs(const CppArgumentList&, CppVariant*);
void setAllowFileAccessFromFileURLs(const CppArgumentList&, CppVariant*);
+ void shadowRoot(const CppArgumentList&, CppVariant*);
// The fallback method is called when a nonexistent method is called on
// the layout test controller object.
@@ -282,9 +283,13 @@ public:
void addOriginAccessWhitelistEntry(const CppArgumentList&, CppVariant*);
void removeOriginAccessWhitelistEntry(const CppArgumentList&, CppVariant*);
- // Clears all Application Caches.
+ // Clears all application caches.
void clearAllApplicationCaches(const CppArgumentList&, CppVariant*);
- // Sets the Application Quota for the localhost origin.
+ // Clears an application cache for an origin.
+ void clearApplicationCacheForOrigin(const CppArgumentList&, CppVariant*);
+ // Returns origins that have application caches.
+ void originsWithApplicationCache(const CppArgumentList&, CppVariant*);
+ // Sets the application cache quota for the localhost origin.
void setApplicationCacheOriginQuota(const CppArgumentList&, CppVariant*);
// Clears all databases.
@@ -305,6 +310,8 @@ public:
// Gets the number of pages to be printed.
void numberOfPages(const CppArgumentList&, CppVariant*);
+ // Gets the number of geolocation permissions requests pending.
+ void numberOfPendingGeolocationPermissionRequests(const CppArgumentList&, CppVariant*);
// Allows layout tests to start Timeline profiling.
void setTimelineProfilingEnabled(const CppArgumentList&, CppVariant*);
@@ -337,6 +344,24 @@ public:
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*);
+
+ // LocalStorage origin-related
+ void deleteAllLocalStorage(const CppArgumentList&, CppVariant*);
+ void originsWithLocalStorage(const CppArgumentList&, CppVariant*);
+ void deleteLocalStorageForOrigin(const CppArgumentList&, CppVariant*);
+ void observeStorageTrackerNotifications(const CppArgumentList&, CppVariant*);
+ void syncLocalStorage(const CppArgumentList&, CppVariant*);
+
+ // Enable or disable plugins.
+ void setPluginsEnabled(const CppArgumentList&, CppVariant*);
+
public:
// The following methods are not exposed to JavaScript.
void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
@@ -365,6 +390,7 @@ public:
bool shouldAddFileToPasteboard() { return m_shouldAddFileToPasteboard; }
bool stopProvisionalFrameLoads() { return m_stopProvisionalFrameLoads; }
bool deferMainResourceDataLoad() { return m_deferMainResourceDataLoad; }
+ void setShowDebugLayerTree(bool value) { m_showDebugLayerTree = value; }
bool testRepaint() const { return m_testRepaint; }
bool sweepHorizontally() const { return m_sweepHorizontally; }
@@ -538,6 +564,9 @@ private:
// 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;
+
WorkQueue m_workQueue;
CppVariant m_globalFlag;
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
index 2574abc..4790509 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShell.cpp
@@ -85,11 +85,13 @@ TestShell::TestShell(bool testShellMode)
, m_devTools(0)
, m_allowExternalPages(false)
, m_acceleratedCompositingEnabled(false)
+ , m_forceCompositingMode(false)
, m_accelerated2dCanvasEnabled(false)
, m_stressOpt(false)
, m_stressDeopt(false)
, m_dumpWhenFinished(true)
{
+ WebRuntimeFeatures::enableDataTransferItems(true);
WebRuntimeFeatures::enableGeolocation(true);
WebRuntimeFeatures::enableIndexedDatabase(true);
WebRuntimeFeatures::enableFileSystem(true);
@@ -162,6 +164,7 @@ void TestShell::resetWebSettings(WebView& webView)
{
m_prefs.reset();
m_prefs.acceleratedCompositingEnabled = m_acceleratedCompositingEnabled;
+ m_prefs.forceCompositingMode = m_forceCompositingMode;
m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
m_prefs.applyTo(&webView);
}
@@ -187,6 +190,9 @@ void TestShell::runFileTest(const TestParams& params)
|| testUrl.find("\\inspector\\") != string::npos)
showDevTools();
+ if (m_params.debugLayerTree)
+ m_layoutTestController->setShowDebugLayerTree(true);
+
if (m_dumpWhenFinished)
m_printer->handleTestHeader(testUrl.c_str());
loadURL(m_params.testUrl);
@@ -453,7 +459,7 @@ void TestShell::dump()
if (fwrite(dataUtf8.c_str(), 1, dataUtf8.size(), stdout) != dataUtf8.size())
FATAL("Short write to stdout, disk full?\n");
} else {
- printf("%s", frame->renderTreeAsText().utf8().data());
+ printf("%s", frame->renderTreeAsText(m_params.debugRenderTree).utf8().data());
bool recursive = m_layoutTestController->shouldDumpChildFrameScrollPositions();
dumpFrameScrollPosition(frame, recursive);
}
@@ -544,14 +550,12 @@ void TestShell::dumpImage(skia::PlatformCanvas* canvas) const
md5hash.append(hex);
}
- // Only encode and dump the png if the hashes don't match. Encoding the image
- // is really expensive.
+ // 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;
- webkit_support::EncodeBGRAPNG(
- reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()),
- sourceBitmap.width(), sourceBitmap.height(),
- static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, &png);
+ webkit_support::EncodeBGRAPNGWithChecksum(reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()), sourceBitmap.width(),
+ sourceBitmap.height(), static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, md5hash, &png);
m_printer->handleImage(md5hash.c_str(), m_params.pixelHash.c_str(), &png[0], png.size(), m_params.pixelFileName.c_str());
} else
@@ -575,7 +579,8 @@ WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url, DRTDevToolsAgent* devToolsAgent)
{
WebViewHost* host = new WebViewHost(this);
- WebView* view = WebView::create(host, devToolsAgent, 0);
+ WebView* view = WebView::create(host);
+ view->setDevToolsAgentClient(devToolsAgent);
host->setWebWidget(view);
m_prefs.applyTo(view);
view->initializeMainFrame(host);
diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h
index ef9be7f..d84d642 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.h
+++ b/Tools/DumpRenderTree/chromium/TestShell.h
@@ -65,6 +65,8 @@ class DRTDevToolsClient;
struct TestParams {
bool dumpTree;
bool dumpPixels;
+ bool debugRenderTree;
+ bool debugLayerTree;
bool printSeparators;
WebKit::WebURL testUrl;
// Resultant image file name. Required only if the test_shell mode.
@@ -74,6 +76,8 @@ struct TestParams {
TestParams()
: dumpTree(true)
, dumpPixels(false)
+ , debugRenderTree(false)
+ , debugLayerTree(false)
, printSeparators(false) {}
};
@@ -125,6 +129,7 @@ public:
void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
void setAcceleratedCompositingEnabled(bool enabled) { m_acceleratedCompositingEnabled = enabled; }
+ void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
#if defined(OS_WIN)
@@ -200,6 +205,7 @@ private:
int m_timeout; // timeout value in millisecond
bool m_allowExternalPages;
bool m_acceleratedCompositingEnabled;
+ bool m_forceCompositingMode;
bool m_accelerated2dCanvasEnabled;
WebPreferences m_prefs;
bool m_stressOpt;
diff --git a/Tools/DumpRenderTree/chromium/TestShellWin.cpp b/Tools/DumpRenderTree/chromium/TestShellWin.cpp
index 3b3ddd9..f82771f 100644
--- a/Tools/DumpRenderTree/chromium/TestShellWin.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShellWin.cpp
@@ -166,39 +166,11 @@ void openStartupDialog()
bool checkLayoutTestSystemDependencies()
{
- std::list<std::string> errors;
-
- OSVERSIONINFOEX versionInfo;
- ::ZeroMemory(&versionInfo, sizeof(OSVERSIONINFOEX));
- versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
- ::GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&versionInfo));
-
- // Default to XP metrics, override if on Vista or win 7.
- int requiredVScrollSize = 17;
- int requiredFontSize = -11; // 8 pt
- const wchar_t* requiredFont = L"Tahoma";
- bool isVista = false;
- bool isWin7 = false;
- const DWORD major = versionInfo.dwMajorVersion;
- const DWORD minor = versionInfo.dwMinorVersion;
- const WORD type = versionInfo.wProductType;
- if (major == 6 && minor == 1 && type == VER_NT_WORKSTATION) {
- requiredFont = L"Segoe UI";
- requiredFontSize = -12;
- isWin7 = true;
- } else if (major == 6 && !minor && type == VER_NT_WORKSTATION) {
- requiredFont = L"Segoe UI";
- requiredFontSize = -12; // 9 pt
- isVista = true;
- } else if (!(major == 5 && minor == 1 && type == VER_NT_WORKSTATION)) {
- // The above check is for XP, so that means ...
- errors.push_back("Unsupported Operating System version "
- "(must use XP, Vista, or Windows 7).");
- }
-
// 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).");
@@ -210,21 +182,22 @@ bool checkLayoutTestSystemDependencies()
if (fontSmoothingEnabled && (fontSmoothingType == FE_FONTSMOOTHINGCLEARTYPE))
errors.push_back("ClearType must be disabled.");
- // Check that we're using the default system fonts
- NONCLIENTMETRICS metrics;
- // Checks Vista or later.
- metrics.cbSize = major >= 6 ? sizeof(NONCLIENTMETRICS) : NONCLIENTMETRICS_SIZE_PRE_VISTA;
+ // 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)) {
- if (isVista || isWin7)
- errors.push_back("Must use either the Aero or Basic theme.");
- else
- errors.push_back("Must use the default XP theme (Luna).");
+ errors.push_back(isVistaOrLater ? "Must use either the Aero or Basic theme." : "Must use the default XP theme (Luna).");
break;
}
}
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.cpp b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
index 71f5ec7..84f84b6 100644
--- a/Tools/DumpRenderTree/chromium/WebPreferences.cpp
+++ b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
@@ -104,6 +104,7 @@ void WebPreferences::reset()
hyperlinkAuditingEnabled = false;
acceleratedCompositingEnabled = false;
accelerated2dCanvasEnabled = false;
+ forceCompositingMode = false;
}
void WebPreferences::applyTo(WebView* webView)
@@ -149,6 +150,7 @@ void WebPreferences::applyTo(WebView* webView)
webView->setTabsToLinks(tabsToLinks);
settings->setCaretBrowsingEnabled(caretBrowsingEnabled);
settings->setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
+ settings->setForceCompositingMode(forceCompositingMode);
settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
// Fixed values.
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.h b/Tools/DumpRenderTree/chromium/WebPreferences.h
index 50bb8cc..ad27fb8 100644
--- a/Tools/DumpRenderTree/chromium/WebPreferences.h
+++ b/Tools/DumpRenderTree/chromium/WebPreferences.h
@@ -78,6 +78,7 @@ struct WebPreferences {
bool hyperlinkAuditingEnabled;
bool caretBrowsingEnabled;
bool acceleratedCompositingEnabled;
+ bool forceCompositingMode;
bool accelerated2dCanvasEnabled;
WebPreferences() { reset(); }
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
index a0ed6da..97c00e2 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -1156,6 +1156,12 @@ WebViewHost::~WebViewHost()
webkit_support::QuitMessageLoop();
}
+void WebViewHost::setWebWidget(WebKit::WebWidget* widget)
+{
+ m_webWidget = widget;
+ webView()->setSpellCheckClient(this);
+}
+
WebView* WebViewHost::webView() const
{
ASSERT(m_webWidget);
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.h b/Tools/DumpRenderTree/chromium/WebViewHost.h
index 4fc3400..014be2e 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.h
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.h
@@ -37,6 +37,7 @@
#include "WebAccessibilityNotification.h"
#include "WebCursorInfo.h"
#include "WebFrameClient.h"
+#include "WebSpellCheckClient.h"
#include "WebViewClient.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
@@ -64,11 +65,11 @@ namespace skia {
class PlatformCanvas;
}
-class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient, public NavigationHost {
+class WebViewHost : public WebKit::WebSpellCheckClient, public WebKit::WebViewClient, public WebKit::WebFrameClient, public NavigationHost {
public:
WebViewHost(TestShell* shell);
~WebViewHost();
- void setWebWidget(WebKit::WebWidget* widget) { m_webWidget = widget; }
+ void setWebWidget(WebKit::WebWidget*);
WebKit::WebView* webView() const;
WebKit::WebWidget* webWidget() const;
void reset();
@@ -104,6 +105,11 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
// NavigationHost
virtual bool navigate(const TestNavigationEntry&, bool reload);
+ // WebKit::WebSpellCheckClient
+ virtual void spellCheck(const WebKit::WebString&, int& offset, int& length);
+ 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&);
virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType);
@@ -126,9 +132,6 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
virtual void didChangeContents();
virtual void didEndEditing();
virtual bool handleCurrentKeyboardEvent();
- virtual void spellCheck(const WebKit::WebString&, int& offset, int& length);
- virtual void requestCheckingOfText(const WebKit::WebString&, WebKit::WebTextCheckingCompletion*);
- virtual WebKit::WebString autoCorrectWord(const WebKit::WebString&);
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);
diff --git a/Tools/DumpRenderTree/chromium/config.h b/Tools/DumpRenderTree/chromium/config.h
index 7dfda18..ed3aad9 100644
--- a/Tools/DumpRenderTree/chromium/config.h
+++ b/Tools/DumpRenderTree/chromium/config.h
@@ -53,4 +53,7 @@
#define JS_EXPORTDATA
#endif
+#define WTF_EXPORT_PRIVATE JS_EXPORTDATA
+#define JS_EXPORT_PRIVATE JS_EXPORTDATA
+
#endif // config_h
diff --git a/Tools/DumpRenderTree/config.h b/Tools/DumpRenderTree/config.h
index 351a2b1..90cfcf6 100644
--- a/Tools/DumpRenderTree/config.h
+++ b/Tools/DumpRenderTree/config.h
@@ -26,13 +26,21 @@
#include <wtf/Platform.h>
-#ifdef __cplusplus
-#undef new
-#undef delete
-#include <wtf/FastMalloc.h>
-#endif
+/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */
+#if USE(EXPORT_MACROS)
+
+#include <wtf/ExportMacros.h>
+
+#define WTF_EXPORT_PRIVATE WTF_IMPORT
+#define JS_EXPORT_PRIVATE WTF_IMPORT
+#define WEBKIT_EXPORTDATA WTF_IMPORT
+
+#define JS_EXPORTDATA JS_EXPORT_PRIVATE
+#define JS_EXPORTCLASS JS_EXPORT_PRIVATE
+
+#else /* !USE(EXPORT_MACROS) */
-#if OS(WINDOWS) && !COMPILER(GCC)
+#if OS(WINDOWS) && !COMPILER(GCC) && !defined(BUILDING_WX__)
#define JS_EXPORTDATA __declspec(dllimport)
#define WEBKIT_EXPORTDATA __declspec(dllimport)
#else
@@ -40,6 +48,17 @@
#define WEBKIT_EXPORTDATA
#endif
+#define WTF_EXPORT_PRIVATE JS_EXPORTDATA
+#define JS_EXPORT_PRIVATE JS_EXPORTDATA
+
+#endif /* USE(EXPORT_MACROS) */
+
+#ifdef __cplusplus
+#undef new
+#undef delete
+#include <wtf/FastMalloc.h>
+#endif
+
#if PLATFORM(MAC)
#define WTF_USE_CF 1
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp b/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp
index be66513..8d73d45 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp
+++ b/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp
@@ -92,6 +92,9 @@ static gboolean axObjectEventListener(GSignalInvocationHint *signalHint,
} else if (!g_strcmp0(signal_query.signal_name, "children-changed")) {
signalName.set(g_strdup_printf("children-changed = %d",
g_value_get_uint(&paramValues[1])));
+ } else if (!g_strcmp0(signal_query.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));
diff --git a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
index 3f70b49..f768b43 100644
--- a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -2,7 +2,7 @@
* Copyright (C) 2007 Eric Seidel <eric@webkit.org>
* Copyright (C) 2008 Alp Toker <alp@nuanti.com>
* Copyright (C) 2009 Jan Alonzo <jmalonzo@gmail.com>
- * Copyright (C) 2010 Igalia S.L.
+ * Copyright (C) 2010, 2011 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -137,9 +137,13 @@ static void initializeGtkFontSettings(const char* testURL)
GtkSettings* settings = gtk_settings_get_default();
if (!settings)
return;
- g_object_set(settings, "gtk-xft-antialias", 1,
+ g_object_set(settings,
+ "gtk-xft-dpi", 98304, // This is 96 * 1024 or 96 DPI according to the GTK+ docs.
+ "gtk-xft-antialias", 1,
"gtk-xft-hinting", 0,
- "gtk-font-name", "Liberation Sans 16", NULL);
+ "gtk-font-name", "Liberation Sans 12",
+ NULL);
+ gdk_screen_set_resolution(gdk_screen_get_default(), 96.0);
// One test needs subpixel anti-aliasing turned on, but generally we
// want all text in other tests to use to grayscale anti-aliasing.
@@ -419,8 +423,8 @@ static void resetDefaultsToConsistentValues()
"sans-serif-font-family", "Helvetica",
"cursive-font-family", "cursive",
"fantasy-font-family", "fantasy",
- "default-font-size", 16,
- "default-monospace-font-size", 13,
+ "default-font-size", 12,
+ "default-monospace-font-size", 10,
"minimum-font-size", 0,
"enable-caret-browsing", FALSE,
"enable-page-cache", FALSE,
@@ -458,7 +462,7 @@ static void resetDefaultsToConsistentValues()
setlocale(LC_ALL, "");
DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(true);
- DumpRenderTreeSupportGtk::setIconDatabaseEnabled(false);
+ webkit_icon_database_set_path(webkit_get_icon_database(), 0);
DumpRenderTreeSupportGtk::setSelectTrailingWhitespaceEnabled(false);
if (axController)
@@ -583,8 +587,6 @@ void dump()
static void setDefaultsToConsistentStateValuesForTesting()
{
- gdk_screen_set_resolution(gdk_screen_get_default(), 72.0);
-
resetDefaultsToConsistentValues();
/* Disable the default auth dialog for testing */
@@ -598,6 +600,26 @@ static void setDefaultsToConsistentStateValuesForTesting()
gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "gtkwebkitdrt", "databases", NULL);
webkit_set_web_database_directory_path(databaseDirectory);
g_free(databaseDirectory);
+
+#if defined(GTK_API_VERSION_2)
+ gtk_rc_parse_string("style \"nix_scrollbar_spacing\" "
+ "{ "
+ " GtkScrolledWindow::scrollbar-spacing = 0 "
+ "} "
+ "class \"GtkWidget\" style \"nix_scrollbar_spacing\"");
+
+#else
+ GtkCssProvider* cssProvider = gtk_css_provider_new();
+ gtk_css_provider_load_from_data(cssProvider,
+ " * { "
+ " -GtkScrolledWindow-scrollbar-spacing: 0;"
+ "} ",
+ -1, 0);
+ gtk_style_context_add_provider_for_screen(gdk_display_get_default_screen(gdk_display_get_default()),
+ GTK_STYLE_PROVIDER(cssProvider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ g_object_unref(cssProvider);
+#endif
}
static void sendPixelResultsEOF()
@@ -1027,6 +1049,17 @@ static void frameCreatedCallback(WebKitWebView* webView, WebKitWebFrame* webFram
static void willSendRequestCallback(WebKitWebView* webView, WebKitWebFrame*, WebKitWebResource*, WebKitNetworkRequest* request, WebKitNetworkResponse*)
{
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));
+ soup_uri_free(uri);
+ return;
+ }
+ soup_uri_free(uri);
+
if (soupMessage) {
const set<string>& clearHeaders = gLayoutTestController->willSendRequestClearHeaders();
diff --git a/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 77d6ae1..c26e2db 100644
--- a/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -332,9 +332,9 @@ void LayoutTestController::setUserStyleSheetLocation(JSStringRef path)
setUserStyleSheetEnabled(true);
}
-void LayoutTestController::setValueForUser(JSContextRef context, JSValueRef element, JSStringRef value)
+void LayoutTestController::setValueForUser(JSContextRef context, JSValueRef nodeObject, JSStringRef value)
{
- // FIXME: implement
+ DumpRenderTreeSupportGtk::setValueForUser(context, nodeObject, value);
}
void LayoutTestController::setViewModeMediaFeature(JSStringRef mode)
@@ -458,6 +458,11 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
// FIXME: implement
}
+void LayoutTestController::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool isAutofilled)
+{
+ DumpRenderTreeSupportGtk::setAutofilled(context, nodeObject, isAutofilled);
+}
+
void LayoutTestController::disableImageLoading()
{
// FIXME: Implement for testing fix for https://bugs.webkit.org/show_bug.cgi?id=27896
@@ -488,6 +493,12 @@ void LayoutTestController::setGeolocationPermission(bool allow)
setGeolocationPermissionCommon(allow);
}
+int LayoutTestController::numberOfPendingGeolocationPermissionRequests()
+{
+ // FIXME: Implement for Geolocation layout tests.
+ return -1;
+}
+
void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
{
// FIXME: Implement for speech input layout tests.
@@ -496,7 +507,12 @@ void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double c
void LayoutTestController::setIconDatabaseEnabled(bool enabled)
{
- DumpRenderTreeSupportGtk::setIconDatabaseEnabled(enabled);
+ WebKitIconDatabase* database = webkit_get_icon_database();
+ if (enabled) {
+ GOwnPtr<gchar> iconDatabasePath(g_build_filename(g_get_tmp_dir(), "DumpRenderTree", "icondatabase", NULL));
+ webkit_icon_database_set_path(database, iconDatabasePath.get());
+ } else
+ webkit_icon_database_set_path(database, 0);
}
void LayoutTestController::setJavaScriptProfilingEnabled(bool flag)
@@ -627,12 +643,23 @@ void LayoutTestController::clearPersistentUserStyleSheet()
void LayoutTestController::clearAllApplicationCaches()
{
- // FIXME: implement to support Application Cache quotas.
+ // FIXME: Implement to support application cache quotas.
}
void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
{
- // FIXME: implement to support Application Cache quotas.
+ // FIXME: Implement to support application cache quotas.
+}
+
+void LayoutTestController::clearApplicationCacheForOrigin(OpaqueJSString*)
+{
+ // FIXME: Implement to support deleting all application caches for an origin.
+}
+
+JSValueRef LayoutTestController::originsWithApplicationCache(JSContextRef context)
+{
+ // FIXME: Implement to get origins that contain application caches.
+ return JSValueMakeUndefined(context);
}
void LayoutTestController::clearAllDatabases()
@@ -646,6 +673,32 @@ void LayoutTestController::setDatabaseQuota(unsigned long long quota)
webkit_security_origin_set_web_database_quota(origin, quota);
}
+JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
+{
+ // FIXME: implement
+ return JSValueMakeUndefined(context);
+}
+
+void LayoutTestController::deleteAllLocalStorage()
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::deleteLocalStorageForOrigin(JSStringRef originIdentifier)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::observeStorageTrackerNotifications(unsigned number)
+{
+ // FIXME: implement
+}
+
+void LayoutTestController::syncLocalStorage()
+{
+ // FIXME: implement
+}
+
void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool, JSStringRef)
{
// FIXME: implement
@@ -873,6 +926,11 @@ bool LayoutTestController::hasSpellingMarker(int from, int length)
return DumpRenderTreeSupportGtk::webkitWebFrameSelectionHasSpellingMarker(mainFrame, from, length);
}
+bool LayoutTestController::hasGrammarMarker(int from, int length)
+{
+ return false;
+}
+
void LayoutTestController::dumpConfigurationForViewport(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight)
{
WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
diff --git a/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig b/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
index 28a0518..8463985 100644
--- a/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
+++ b/Tools/DumpRenderTree/mac/Configurations/Base.xcconfig
@@ -52,12 +52,16 @@ TARGET_GCC_VERSION_1050_ = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_ACTUAL));
TARGET_GCC_VERSION_1050_0310 = GCC_42;
TARGET_GCC_VERSION_1050_0320 = GCC_42;
TARGET_GCC_VERSION_1060 = GCC_42;
-TARGET_GCC_VERSION_1070 = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070 = $(TARGET_GCC_VERSION_1070_$(CONFIGURATION));
+TARGET_GCC_VERSION_1070_Debug = LLVM_COMPILER;
+TARGET_GCC_VERSION_1070_Release = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070_Production = LLVM_GCC_42;
GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
GCC_VERSION_GCC_40 = 4.0;
GCC_VERSION_GCC_42 = 4.2;
GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
+GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0;
// If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK.
SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
index dca0d38..207e8fb 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -48,6 +48,7 @@
#import "PixelDumpSupport.h"
#import "PolicyDelegate.h"
#import "ResourceLoadDelegate.h"
+#import "StorageTrackerDelegate.h"
#import "UIDelegate.h"
#import "WebArchiveDumpSupport.h"
#import "WorkQueue.h"
@@ -77,6 +78,7 @@
#import <WebKit/WebPreferencesPrivate.h>
#import <WebKit/WebPreferenceKeysPrivate.h>
#import <WebKit/WebResourceLoadDelegate.h>
+#import <WebKit/WebStorageManagerPrivate.h>
#import <WebKit/WebTypesInternal.h>
#import <WebKit/WebViewPrivate.h>
#import <getopt.h>
@@ -134,6 +136,7 @@ static EditingDelegate *editingDelegate;
static ResourceLoadDelegate *resourceLoadDelegate;
static HistoryDelegate *historyDelegate;
PolicyDelegate *policyDelegate;
+StorageTrackerDelegate *storageDelegate;
static int dumpPixels;
static int threaded;
@@ -303,6 +306,9 @@ WebView *createWebViewAndOffscreenWindow()
[WebView registerURLSchemeAsLocal:@"feedsearch"];
[webView setContinuousSpellCheckingEnabled:YES];
+ [webView setGrammarCheckingEnabled:YES];
+ [webView setInteractiveFormValidationEnabled:YES];
+ [webView setValidationMessageTimerMagnification:-1];
// To make things like certain NSViews, dragging, and plug-ins work, put the WebView a window, but put it off-screen so you don't see it.
// Put it at -10000, -10000 in "flipped coordinates", since WebCore and the DOM use flipped coordinates.
@@ -414,6 +420,7 @@ static void resetDefaultsToConsistentValues()
NSString *path = libraryPathForDumpRenderTree();
[defaults setObject:[path stringByAppendingPathComponent:@"Databases"] forKey:WebDatabaseDirectoryDefaultsKey];
+ [defaults setObject:[path stringByAppendingPathComponent:@"LocalStorage"] forKey:WebStorageDirectoryDefaultsKey];
[defaults setObject:[path stringByAppendingPathComponent:@"LocalCache"] forKey:WebKitLocalCacheDefaultsKey];
WebPreferences *preferences = [WebPreferences standardPreferences];
@@ -545,6 +552,7 @@ static void allocateGlobalControllers()
resourceLoadDelegate = [[ResourceLoadDelegate alloc] init];
policyDelegate = [[PolicyDelegate alloc] init];
historyDelegate = [[HistoryDelegate alloc] init];
+ storageDelegate = [[StorageTrackerDelegate alloc] init];
}
// ObjC++ doens't seem to let me pass NSObject*& sadly.
@@ -562,6 +570,7 @@ static void releaseGlobalControllers()
releaseAndZero(&resourceLoadDelegate);
releaseAndZero(&uiDelegate);
releaseAndZero(&policyDelegate);
+ releaseAndZero(&storageDelegate);
}
static void initializeGlobalsFromCommandLineOptions(int argc, const char *argv[])
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h b/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
index 36c5eac..901008c 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
+++ b/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
@@ -35,6 +35,7 @@
@class DumpRenderTreeDraggingInfo;
@class NavigationController;
@class PolicyDelegate;
+@class StorageTrackerDelegate;
@class WebFrame;
@class WebScriptWorld;
@class WebView;
@@ -42,6 +43,7 @@
class DumpRenderTreeDraggingInfo;
class NavigationController;
class PolicyDelegate;
+class StorageTrackerDelegate;
class WebFrame;
class WebScriptWorld;
class WebView;
@@ -54,6 +56,7 @@ extern WebFrame* topLoadingFrame;
extern DumpRenderTreeDraggingInfo *draggingInfo;
extern NavigationController* gNavigationController;
extern PolicyDelegate* policyDelegate;
+extern StorageTrackerDelegate* storageDelegate;
extern const unsigned maxViewHeight;
extern const unsigned maxViewWidth;
diff --git a/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
index 72ec759..66c0cce 100644
--- a/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
+++ b/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -33,6 +33,7 @@
#import "EditingDelegate.h"
#import "MockGeolocationProvider.h"
#import "PolicyDelegate.h"
+#import "StorageTrackerDelegate.h"
#import "UIDelegate.h"
#import "WorkQueue.h"
#import "WorkQueueItem.h"
@@ -66,6 +67,7 @@
#import <WebKit/WebQuotaManager.h>
#import <WebKit/WebScriptWorld.h>
#import <WebKit/WebSecurityOriginPrivate.h>
+#import <WebKit/WebStorageManagerPrivate.h>
#import <WebKit/WebTypesInternal.h>
#import <WebKit/WebView.h>
#import <WebKit/WebViewPrivate.h>
@@ -133,11 +135,68 @@ void LayoutTestController::clearAllApplicationCaches()
[WebApplicationCache deleteAllApplicationCaches];
}
+void LayoutTestController::syncLocalStorage()
+{
+ [[WebStorageManager sharedWebStorageManager] syncLocalStorage];
+}
+
+void LayoutTestController::observeStorageTrackerNotifications(unsigned number)
+{
+ [storageDelegate logNotifications:number controller:this];
+}
+
+void LayoutTestController::clearApplicationCacheForOrigin(JSStringRef url)
+{
+ RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+
+ WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]];
+ [WebApplicationCache deleteCacheForOrigin:origin];
+ [origin release];
+}
+
+JSValueRef originsArrayToJS(JSContextRef context, NSArray* origins)
+{
+ NSUInteger count = [origins count];
+
+ JSValueRef jsOriginsArray[count];
+ for (NSUInteger i = 0; i < count; i++) {
+ NSString *origin = [[origins objectAtIndex:i] databaseIdentifier];
+ JSRetainPtr<JSStringRef> originJS(Adopt, JSStringCreateWithCFString((CFStringRef)origin));
+ jsOriginsArray[i] = JSValueMakeString(context, originJS.get());
+ }
+
+ return JSObjectMakeArray(context, count, jsOriginsArray, NULL);
+}
+
+JSValueRef LayoutTestController::originsWithApplicationCache(JSContextRef context)
+{
+ return originsArrayToJS(context, [WebApplicationCache originsWithCache]);
+}
+
void LayoutTestController::clearAllDatabases()
{
[[WebDatabaseManager sharedWebDatabaseManager] deleteAllDatabases];
}
+void LayoutTestController::deleteAllLocalStorage()
+{
+ [[WebStorageManager sharedWebStorageManager] deleteAllOrigins];
+}
+
+JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
+{
+ return originsArrayToJS(context, [[WebStorageManager sharedWebStorageManager] origins]);
+}
+
+void LayoutTestController::deleteLocalStorageForOrigin(JSStringRef URL)
+{
+ RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, URL));
+
+ WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]];
+ [[WebStorageManager sharedWebStorageManager] deleteOrigin:origin];
+ [origin release];
+}
+
void LayoutTestController::clearBackForwardList()
{
WebBackForwardList *backForwardList = [[mainFrame webView] backForwardList];
@@ -254,6 +313,11 @@ int LayoutTestController::numberOfPages(float pageWidthInPixels, float pageHeigh
return [mainFrame numberOfPages:pageWidthInPixels:pageHeightInPixels];
}
+int LayoutTestController::numberOfPendingGeolocationPermissionRequests()
+{
+ return [[[mainFrame webView] UIDelegate] numberOfPendingGeolocationPermissionRequests];
+}
+
size_t LayoutTestController::webHistoryItemCount()
{
return [[[WebHistory optionalSharedHistory] allItems] count];
@@ -320,6 +384,15 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
[[[mainFrame webView] preferences] setAuthorAndUserStylesEnabled:flag];
}
+void LayoutTestController::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
+{
+ DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject];
+ if (!element || ![element isKindOfClass:[DOMHTMLInputElement class]])
+ return;
+
+ [(DOMHTMLInputElement *)element _setAutofilled:autofilled];
+}
+
void LayoutTestController::setCustomPolicyDelegate(bool setDelegate, bool permissive)
{
if (setDelegate) {
@@ -484,7 +557,7 @@ void LayoutTestController::setValueForUser(JSContextRef context, JSValueRef node
DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject];
if (!element || ![element isKindOfClass:[DOMHTMLInputElement class]])
return;
-
+
RetainPtr<CFStringRef> valueCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, value));
[(DOMHTMLInputElement *)element _setValueForUser:(NSString *)valueCF.get()];
}
@@ -926,8 +999,8 @@ static NSString *SynchronousLoaderRunLoopMode = @"DumpRenderTreeSynchronousLoade
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
if ([challenge previousFailureCount] == 0) {
- NSURLCredential *credential = [[NSURLCredential alloc] initWithUser:m_username password:m_password persistence:NSURLCredentialPersistenceForSession];
- [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge];
+ RetainPtr<NSURLCredential> credential(AdoptNS, [[NSURLCredential alloc] initWithUser:m_username password:m_password persistence:NSURLCredentialPersistenceForSession]);
+ [[challenge sender] useCredential:credential.get() forAuthenticationChallenge:challenge];
return;
}
[[challenge sender] cancelAuthenticationChallenge:challenge];
@@ -977,9 +1050,9 @@ void LayoutTestController::authenticateSession(JSStringRef url, JSStringRef user
RetainPtr<CFStringRef> usernameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, username));
RetainPtr<CFStringRef> passwordCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, password));
- NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:(NSString *)urlStringCF.get()]];
+ RetainPtr<NSURLRequest> request(AdoptNS, [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:(NSString *)urlStringCF.get()]]);
- [SynchronousLoader makeRequest:request withUsername:(NSString *)usernameCF.get() password:(NSString *)passwordCF.get()];
+ [SynchronousLoader makeRequest:request.get() withUsername:(NSString *)usernameCF.get() password:(NSString *)passwordCF.get()];
#endif
}
@@ -1004,6 +1077,12 @@ bool LayoutTestController::hasSpellingMarker(int from, int length)
{
return [mainFrame hasSpellingMarker:from length:length];
}
+
+bool LayoutTestController::hasGrammarMarker(int from, int length)
+{
+ return [mainFrame hasGrammarMarker:from length:length];
+}
+
void LayoutTestController::dumpConfigurationForViewport(int /*deviceDPI*/, int /*deviceWidth*/, int /*deviceHeight*/, int /*availableWidth*/, int /*availableHeight*/)
{
diff --git a/Tools/DumpRenderTree/mac/PerlSupport/Makefile b/Tools/DumpRenderTree/mac/PerlSupport/Makefile
index 16a9e51..96ddc93 100644
--- a/Tools/DumpRenderTree/mac/PerlSupport/Makefile
+++ b/Tools/DumpRenderTree/mac/PerlSupport/Makefile
@@ -66,7 +66,7 @@ $(PERL_MODULE): DumpRenderTreeSupportPregenerated.pm $(DUMPRENDERTREE)
endif
$(DYLIB): DumpRenderTreeSupport.c $(WRAPPER)
- gcc -g -dynamiclib -o $(DYLIB) `$(PERL) -MExtUtils::Embed -eperl_inc` `$(PERL) -MExtUtils::Embed -eldopts` $^
+ gcc -g -dynamiclib -o $(DYLIB) `$(PERL) -MExtUtils::Embed -eperl_inc` `$(PERL) -MExtUtils::Embed -e'my $$opts = ldopts(0); $$opts =~ s/-arch [^ ]*( |$$)//g; print $$opts, " -arch ", join(" -arch ", split(" ",$$ENV{ARCHS}))'` $^
clean:
rm -f $(WRAPPER) $(PERL_MODULE) $(DYLIB)
diff --git a/Tools/DumpRenderTree/mac/UIDelegate.h b/Tools/DumpRenderTree/mac/UIDelegate.h
index a8017ad..982b480 100644
--- a/Tools/DumpRenderTree/mac/UIDelegate.h
+++ b/Tools/DumpRenderTree/mac/UIDelegate.h
@@ -37,5 +37,6 @@
}
- (void)didSetMockGeolocationPermission;
+- (int)numberOfPendingGeolocationPermissionRequests;
@end
diff --git a/Tools/DumpRenderTree/mac/UIDelegate.mm b/Tools/DumpRenderTree/mac/UIDelegate.mm
index 06a71f8..6b84738 100644
--- a/Tools/DumpRenderTree/mac/UIDelegate.mm
+++ b/Tools/DumpRenderTree/mac/UIDelegate.mm
@@ -205,6 +205,14 @@ DumpRenderTreeDraggingInfo *draggingInfo = nil;
m_timer = [NSTimer scheduledTimerWithTimeInterval:0 target:self selector:@selector(timerFired) userInfo:0 repeats:NO];
}
+- (int)numberOfPendingGeolocationPermissionRequests
+{
+ if (!m_pendingGeolocationPermissionListeners)
+ return 0;
+ return [m_pendingGeolocationPermissionListeners count];
+}
+
+
- (void)timerFired
{
ASSERT(gLayoutTestController->isGeolocationPermissionSet());
@@ -227,7 +235,7 @@ DumpRenderTreeDraggingInfo *draggingInfo = nil;
return NO;
}
-- (BOOL)webView:(WebView *)webView supportsFullScreenForElement:(DOMElement*)element
+- (BOOL)webView:(WebView *)webView supportsFullScreenForElement:(DOMElement*)element withKeyboard:(BOOL)withKeyboard
{
return YES;
}
diff --git a/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm b/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm
index c273087..9f94ecb 100644
--- a/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm
+++ b/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm
@@ -23,6 +23,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import "config.h"
#import "WebArchiveDumpSupport.h"
#import <CFNetwork/CFHTTPMessage.h>
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
index d84af96..a76b886 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -9,6 +9,7 @@ include(../../../Source/WebKit.pri)
INCLUDEPATH += ../../../Source
INCLUDEPATH += ../../../Source/JavaScriptCore
INCLUDEPATH += ../../../Source/JavaScriptCore/ForwardingHeaders
+INCLUDEPATH += ../../../Source/WebKit/qt/WebCoreSupport
INCLUDEPATH += $$BASEDIR
DESTDIR = ../../bin
@@ -51,3 +52,4 @@ wince*: {
}
DEFINES += USE_SYSTEM_MALLOC=1
+DEFINES -= QT_ASCII_CAST_WARNINGS
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 6af6fc2..97d9f20 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -32,7 +32,7 @@
#include "config.h"
#include "DumpRenderTreeQt.h"
-#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include "DumpRenderTreeSupportQt.h"
#include "EventSenderQt.h"
#include "GCControllerQt.h"
#include "LayoutTestControllerQt.h"
@@ -499,6 +499,10 @@ DumpRenderTree::DumpRenderTree()
DumpRenderTree::~DumpRenderTree()
{
+ if (!m_redirectOutputFileName.isEmpty())
+ fclose(stdout);
+ if (!m_redirectErrorFileName.isEmpty())
+ fclose(stderr);
delete m_mainView;
delete m_stdin;
DumpRenderTreeSupportQt::removeMockDeviceOrientation();
@@ -676,9 +680,7 @@ void DumpRenderTree::processArgsLine(const QStringList &args)
{
setStandAloneMode(true);
- for (int i = 1; i < args.size(); ++i)
- if (!args.at(i).startsWith('-'))
- m_standAloneModeTestList.append(args[i]);
+ m_standAloneModeTestList = args;
QFileInfo firstEntry(m_standAloneModeTestList.first());
if (firstEntry.isDir()) {
@@ -690,11 +692,12 @@ void DumpRenderTree::processArgsLine(const QStringList &args)
for (int i = 0; i < m_standAloneModeTestList.size(); ++i)
m_standAloneModeTestList[i] = folderEntry.absoluteFilePath(m_standAloneModeTestList[i]);
}
-
- processLine(m_standAloneModeTestList.first());
- m_standAloneModeTestList.removeFirst();
-
connect(this, SIGNAL(ready()), this, SLOT(loadNextTestInStandAloneMode()));
+
+ if (!m_standAloneModeTestList.isEmpty()) {
+ QString first = m_standAloneModeTestList.takeFirst();
+ processLine(first);
+ }
}
void DumpRenderTree::loadNextTestInStandAloneMode()
@@ -703,9 +706,8 @@ void DumpRenderTree::loadNextTestInStandAloneMode()
emit quit();
return;
}
-
- processLine(m_standAloneModeTestList.first());
- m_standAloneModeTestList.removeFirst();
+ QString first = m_standAloneModeTestList.takeFirst();
+ processLine(first);
}
void DumpRenderTree::processLine(const QString &input)
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
index 5b53cd9..858856f 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
@@ -40,7 +40,7 @@
#include <QSslError>
#endif
-#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include "DumpRenderTreeSupportQt.h"
#include <qgraphicsview.h>
#include <qgraphicswebview.h>
#include <qwebframe.h>
@@ -105,6 +105,8 @@ public:
static void initializeFonts();
#endif
void processArgsLine(const QStringList&);
+ void setRedirectOutputFileName(const QString& fileName) { m_redirectOutputFileName = fileName; }
+ void setRedirectErrorFileName(const QString& fileName) { m_redirectErrorFileName = fileName; }
public Q_SLOTS:
void initJSObjects();
@@ -160,6 +162,8 @@ private:
bool m_standAloneMode;
bool m_graphicsBased;
QString m_persistentStoragePath;
+ QString m_redirectOutputFileName;
+ QString m_redirectErrorFileName;
};
class NetworkAccessManager : public QNetworkAccessManager {
diff --git a/Tools/DumpRenderTree/qt/GCControllerQt.cpp b/Tools/DumpRenderTree/qt/GCControllerQt.cpp
index 2a30ba8..a2e5e0c 100644
--- a/Tools/DumpRenderTree/qt/GCControllerQt.cpp
+++ b/Tools/DumpRenderTree/qt/GCControllerQt.cpp
@@ -29,7 +29,7 @@
#include "config.h"
#include "GCControllerQt.h"
-#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include "DumpRenderTreeSupportQt.h"
#include <qwebpage.h>
diff --git a/Tools/DumpRenderTree/qt/ImageDiff.pro b/Tools/DumpRenderTree/qt/ImageDiff.pro
index cdb067e..b3d5181 100644
--- a/Tools/DumpRenderTree/qt/ImageDiff.pro
+++ b/Tools/DumpRenderTree/qt/ImageDiff.pro
@@ -14,3 +14,4 @@ unix:!mac {
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
}
+DEFINES -= QT_ASCII_CAST_WARNINGS
diff --git a/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 74055e2..4e3087e 100644
--- a/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -28,7 +28,7 @@
*/
#include "config.h"
#include "LayoutTestControllerQt.h"
-#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include "DumpRenderTreeSupportQt.h"
#include "DumpRenderTreeQt.h"
#include "WorkQueue.h"
@@ -315,9 +315,12 @@ void LayoutTestController::queueLoad(const QString& url, const QString& target)
WorkQueue::shared()->queue(new LoadItem(absoluteUrl, target, m_drt->webPage()));
}
-void LayoutTestController::queueLoadHTMLString(const QString& content, const QString& baseURL)
+void LayoutTestController::queueLoadHTMLString(const QString& content, const QString& baseURL, const QString& failingURL)
{
- WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, m_drt->webPage()));
+ if (failingURL.isEmpty())
+ WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, m_drt->webPage()));
+ else
+ WorkQueue::shared()->queue(new LoadAlternateHTMLStringItem(content, baseURL, failingURL, m_drt->webPage()));
}
void LayoutTestController::queueReload()
@@ -552,6 +555,11 @@ void LayoutTestController::clearAllApplicationCaches()
DumpRenderTreeSupportQt::clearAllApplicationCaches();
}
+void LayoutTestController::clearApplicationCacheForOrigin(const QString& url)
+{
+ // FIXME: Implement to support deleting all application caches for an origin.
+}
+
void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
{
if (!m_topLoadingFrame)
@@ -559,6 +567,12 @@ void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quo
m_topLoadingFrame->securityOrigin().setApplicationCacheQuota(quota);
}
+QStringList LayoutTestController::originsWithApplicationCache()
+{
+ // FIXME: Implement to get origins that have application caches.
+ return QStringList();
+}
+
void LayoutTestController::setDatabaseQuota(int size)
{
if (!m_topLoadingFrame)
@@ -766,6 +780,12 @@ void LayoutTestController::setGeolocationPermission(bool allow)
DumpRenderTreeSupportQt::setMockGeolocationPermission(m_drt->webPage(), allow);
}
+int LayoutTestController::numberOfPendingGeolocationPermissionRequests()
+{
+ // FIXME: Implement for Geolocation layout tests.
+ return -1;
+}
+
void LayoutTestController::setGeolocationPermissionCommon(bool allow)
{
m_isGeolocationPermissionSet = true;
@@ -842,5 +862,30 @@ void LayoutTestController::setMinimumTimerInterval(double minimumTimerInterval)
DumpRenderTreeSupportQt::setMinimumTimerInterval(m_drt->webPage(), minimumTimerInterval);
}
+void LayoutTestController::originsWithLocalStorage()
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::deleteAllLocalStorage()
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::deleteLocalStorageForOrigin(const QString& originIdentifier)
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::observeStorageTrackerNotifications(unsigned number)
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::syncLocalStorage()
+{
+ // FIXME: Implement.
+}
+
const unsigned LayoutTestController::maxViewWidth = 800;
const unsigned LayoutTestController::maxViewHeight = 600;
diff --git a/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h b/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 0b5bbba..f29233a 100644
--- a/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -121,7 +121,7 @@ public slots:
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());
+ 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);
@@ -189,7 +189,9 @@ public slots:
void disableImageLoading();
void clearAllApplicationCaches();
+ void clearApplicationCacheForOrigin(const QString& url);
void setApplicationCacheOriginQuota(unsigned long long quota);
+ QStringList originsWithApplicationCache();
void setDatabaseQuota(int size);
void clearAllDatabases();
@@ -219,6 +221,7 @@ public slots:
void setMockGeolocationError(int code, const QString& message);
void setMockGeolocationPosition(double latitude, double longitude, double accuracy);
void setGeolocationPermission(bool allow);
+ int numberOfPendingGeolocationPermissionRequests();
bool isGeolocationPermissionSet() const { return m_isGeolocationPermissionSet; }
bool geolocationPermission() const { return m_geolocationPermission; }
@@ -253,6 +256,12 @@ public slots:
void addUserStyleSheet(const QString& sourceCode);
void setMinimumTimerInterval(double);
+
+ void originsWithLocalStorage();
+ void deleteAllLocalStorage();
+ void deleteLocalStorageForOrigin(const QString& originIdentifier);
+ void observeStorageTrackerNotifications(unsigned number);
+ void syncLocalStorage();
private slots:
void processWork();
diff --git a/Tools/DumpRenderTree/qt/PlainTextControllerQt.cpp b/Tools/DumpRenderTree/qt/PlainTextControllerQt.cpp
index 729ccd0..dd63fea 100644
--- a/Tools/DumpRenderTree/qt/PlainTextControllerQt.cpp
+++ b/Tools/DumpRenderTree/qt/PlainTextControllerQt.cpp
@@ -28,7 +28,7 @@
#include "config.h"
#include "PlainTextControllerQt.h"
-#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include "DumpRenderTreeSupportQt.h"
#include <QApplication>
#include <QInputMethodEvent>
#include <QKeyEvent>
diff --git a/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro b/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
index 96f0fc5..6741668 100644
--- a/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
+++ b/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
@@ -32,6 +32,7 @@ SOURCES = PluginObject.cpp \
Tests/EvaluateJSAfterRemovingPluginElement.cpp \
Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp \
Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \
+ Tests/NPDeallocateCalledBeforeNPShutdown.cpp \
Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \
Tests/NPRuntimeRemoveProperty.cpp \
Tests/NullNPPGetValuePointer.cpp \
@@ -46,6 +47,8 @@ mac {
SOURCES += ../../unix/TestNetscapePlugin/TestNetscapePlugin.cpp
}
+DEFINES -= QT_ASCII_CAST_WARNINGS
+
!win32:!embedded:!mac:!symbian {
LIBS += -lX11
}
diff --git a/Tools/DumpRenderTree/qt/TextInputControllerQt.cpp b/Tools/DumpRenderTree/qt/TextInputControllerQt.cpp
index 9112674..8cf2e4e 100644
--- a/Tools/DumpRenderTree/qt/TextInputControllerQt.cpp
+++ b/Tools/DumpRenderTree/qt/TextInputControllerQt.cpp
@@ -28,7 +28,7 @@
*/
#include "config.h"
#include "TextInputControllerQt.h"
-#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
+#include "DumpRenderTreeSupportQt.h"
#include <QApplication>
#include <QInputMethodEvent>
diff --git a/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp b/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp
index d1baf08..b093366 100644
--- a/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp
+++ b/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp
@@ -28,6 +28,7 @@
*/
#include "config.h"
#include "WorkQueueItemQt.h"
+#include "DumpRenderTreeSupportQt.h"
QWebFrame* findFrameNamed(const QString& frameName, QWebFrame* frame)
{
@@ -72,6 +73,18 @@ bool LoadHTMLStringItem::invoke() const
return true;
}
+bool LoadAlternateHTMLStringItem::invoke() const
+{
+ Q_ASSERT(m_webPage);
+
+ QWebFrame* frame = m_webPage->mainFrame();
+ if (!frame)
+ return false;
+
+ DumpRenderTreeSupportQt::setAlternateHtml(frame, m_content, QUrl(m_baseURL), QUrl(m_failingURL));
+ return true;
+}
+
bool ReloadItem::invoke() const
{
//qDebug() << ">>>ReloadItem::invoke";
diff --git a/Tools/DumpRenderTree/qt/WorkQueueItemQt.h b/Tools/DumpRenderTree/qt/WorkQueueItemQt.h
index 97c9b04..ac7d1b3 100644
--- a/Tools/DumpRenderTree/qt/WorkQueueItemQt.h
+++ b/Tools/DumpRenderTree/qt/WorkQueueItemQt.h
@@ -80,6 +80,24 @@ private:
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)
+ , m_baseURL(baseURL)
+ , m_failingURL(failingURL)
+ {
+ }
+
+private:
+ virtual bool invoke() const;
+
+ QString m_content;
+ QString m_baseURL;
+ QString m_failingURL;
+};
+
class ReloadItem : public WorkQueueItem {
public:
ReloadItem(QWebPage *page)
diff --git a/Tools/DumpRenderTree/qt/main.cpp b/Tools/DumpRenderTree/qt/main.cpp
index 8349d73..bc762e5 100644
--- a/Tools/DumpRenderTree/qt/main.cpp
+++ b/Tools/DumpRenderTree/qt/main.cpp
@@ -67,6 +67,33 @@ void messageHandler(QtMsgType type, const char *message)
// do nothing
}
+// We only support -v or --pixel-tests or --stdout or --stderr or -, all the others will be
+// pass as test case name (even -abc.html is a valid test case name)
+bool isOption(const QString& str)
+{
+ return str == QString("-v") || str == QString("--pixel-tests")
+ || str == QString("--stdout") || str == QString("--stderr")
+ || str == QString("-");
+}
+
+QString takeOptionValue(QStringList& arguments, int index)
+{
+ QString result;
+
+ if (index + 1 < arguments.count() && !isOption(arguments.at(index + 1)))
+ result = arguments.takeAt(index + 1);
+ arguments.removeAt(index);
+
+ return result;
+}
+
+void printUsage()
+{
+ fprintf(stderr, "Usage: DumpRenderTree [-v|--pixel-tests] [--stdout output_filename] [-stderr error_filename] filename [filename2..n]\n");
+ fprintf(stderr, "Or folder containing test files: DumpRenderTree [-v|--pixel-tests] dirpath\n");
+ fflush(stderr);
+}
+
QString get_backtrace() {
QString s;
@@ -143,28 +170,70 @@ int main(int argc, char* argv[])
QStringList args = app.arguments();
if (args.count() < 2) {
- qDebug() << "Usage: DumpRenderTree [-v|--pixel-tests] filename [filename2..n]";
- qDebug() << "Or folder containing test files: DumpRenderTree [-v|--pixel-tests] dirpath";
- exit(0);
+ printUsage();
+ exit(1);
}
+ // Remove the first arguments, it is application name itself
+ args.removeAt(0);
+
// Suppress debug output from Qt if not started with -v
- if (!args.contains(QLatin1String("-v")))
+ int index = args.indexOf(QLatin1String("-v"));
+ if (index == -1)
qInstallMsgHandler(messageHandler);
+ else
+ args.removeAt(index);
WebCore::DumpRenderTree dumper;
- if (args.contains(QLatin1String("--pixel-tests")))
+ index = args.indexOf(QLatin1String("--pixel-tests"));
+ if (index != -1) {
dumper.setDumpPixels(true);
+ args.removeAt(index);
+ }
+ index = args.indexOf(QLatin1String("--stdout"));
+ if (index != -1) {
+ QString fileName = takeOptionValue(args, index);
+ dumper.setRedirectOutputFileName(fileName);
+ if (fileName.isEmpty() || !freopen(qPrintable(fileName), "w", stdout)) {
+ fprintf(stderr, "STDOUT redirection failed.");
+ exit(1);
+ }
+ }
+ index = args.indexOf(QLatin1String("--stderr"));
+ if (index != -1) {
+ QString fileName = takeOptionValue(args, index);
+ dumper.setRedirectErrorFileName(fileName);
+ if (!freopen(qPrintable(fileName), "w", stderr)) {
+ fprintf(stderr, "STDERR redirection failed.");
+ exit(1);
+ }
+ }
QWebDatabase::removeAllDatabases();
- if (args.contains(QLatin1String("-"))) {
- QObject::connect(&dumper, SIGNAL(ready()), &dumper, SLOT(readLine()), Qt::QueuedConnection);
- QTimer::singleShot(0, &dumper, SLOT(readLine()));
- } else
+ index = args.indexOf(QLatin1String("-"));
+ if (index != -1) {
+ args.removeAt(index);
+
+ // Continue waiting in STDIN for more test case after process one test case
+ QObject::connect(&dumper, SIGNAL(ready()), &dumper, SLOT(readLine()), Qt::QueuedConnection);
+
+ // Read and only read the first test case, ignore the others
+ if (args.size() > 0) {
+ // Process the argument first
+ dumper.processLine(args[0]);
+ } else
+ QTimer::singleShot(0, &dumper, SLOT(readLine()));
+ } else {
+ // Go into standalone mode
+ // Standalone mode need at least one test case
+ if (args.count() < 1) {
+ printUsage();
+ exit(1);
+ }
dumper.processArgsLine(args);
-
+ }
return app.exec();
#ifdef Q_WS_X11
diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.vcproj b/Tools/DumpRenderTree/win/DumpRenderTree.vcproj
index ca26cb8..39d2df2 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTree.vcproj
+++ b/Tools/DumpRenderTree/win/DumpRenderTree.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\DumpRenderTreeDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeApple.vsprops"
+ InheritedPropertySheets=".\DumpRenderTreeRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -140,7 +140,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- 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\cURL.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeCairo.vsprops;.\DumpRenderTreeCFLite.vsprops"
+ InheritedPropertySheets=".\DumpRenderTreeDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -201,7 +201,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.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"
+ InheritedPropertySheets=".\DumpRenderTreeReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -262,7 +262,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\DumpRenderTreeDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -321,9 +321,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeApple.vsprops"
+ InheritedPropertySheets=".\DumpRenderTreeProduction.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -610,7 +610,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -646,7 +646,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ExcludedFromBuild="true"
>
<Tool
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops
new file mode 100644
index 0000000..adfa61f
--- /dev/null
+++ b/Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops
@@ -0,0 +1,13 @@
+<?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
new file mode 100644
index 0000000..aa3db54
--- /dev/null
+++ b/Tools/DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops
@@ -0,0 +1,14 @@
+<?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
new file mode 100644
index 0000000..b0985b0
--- /dev/null
+++ b/Tools/DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops
@@ -0,0 +1,9 @@
+<?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\cURL.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeCairo.vsprops;.\DumpRenderTreeCFLite.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops
new file mode 100644
index 0000000..818bff2
--- /dev/null
+++ b/Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops
@@ -0,0 +1,14 @@
+<?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\release.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
new file mode 100644
index 0000000..c39a9cd
--- /dev/null
+++ b/Tools/DumpRenderTree/win/DumpRenderTreeRelease.vsprops
@@ -0,0 +1,13 @@
+<?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\release.vsprops;
+ .\DumpRenderTreeCommon.vsprops;
+ .\DumpRenderTreeApple.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..508e8c5
--- /dev/null
+++ b/Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops
@@ -0,0 +1,16 @@
+<?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\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
index f48af25..7094fec 100644
--- a/Tools/DumpRenderTree/win/ImageDiff.vcproj
+++ b/Tools/DumpRenderTree/win/ImageDiff.vcproj
@@ -17,7 +17,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\ImageDiffCommon.vsprops"
+ InheritedPropertySheets=".\ImageDiffDebug.vsprops"
CharacterSet="2"
>
<Tool
@@ -78,7 +78,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\ImageDiffCommon.vsprops"
+ InheritedPropertySheets=".\ImageDiffRelease.vsprops"
CharacterSet="2"
>
<Tool
@@ -139,7 +139,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\ImageDiffDebugAll.vsprops"
CharacterSet="2"
>
<Tool
@@ -200,7 +200,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\ImageDiffCommon.vsprops"
+ InheritedPropertySheets=".\ImageDiffDebugCairoCFLite.vsprops"
CharacterSet="2"
>
<Tool
@@ -259,9 +259,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\ImageDiffCommon.vsprops"
+ InheritedPropertySheets=".\ImageDiffProduction.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
@@ -323,7 +323,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\ImageDiffCommon.vsprops"
+ InheritedPropertySheets=".\ImageDiffReleaseCairoCFLite.vsprops"
CharacterSet="2"
>
<Tool
diff --git a/Tools/DumpRenderTree/win/ImageDiffDebug.vsprops b/Tools/DumpRenderTree/win/ImageDiffDebug.vsprops
new file mode 100644
index 0000000..28641a2
--- /dev/null
+++ b/Tools/DumpRenderTree/win/ImageDiffDebug.vsprops
@@ -0,0 +1,11 @@
+<?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
new file mode 100644
index 0000000..824a4b9
--- /dev/null
+++ b/Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..bd6bc8a
--- /dev/null
+++ b/Tools/DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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;
+ .\ImageDiffCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffProduction.vsprops b/Tools/DumpRenderTree/win/ImageDiffProduction.vsprops
new file mode 100644
index 0000000..37ff9de
--- /dev/null
+++ b/Tools/DumpRenderTree/win/ImageDiffProduction.vsprops
@@ -0,0 +1,12 @@
+<?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\release.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
new file mode 100644
index 0000000..79e9749
--- /dev/null
+++ b/Tools/DumpRenderTree/win/ImageDiffRelease.vsprops
@@ -0,0 +1,11 @@
+<?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\release.vsprops;
+ .\ImageDiffCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..1cb062b
--- /dev/null
+++ b/Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\ImageDiffCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp b/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
index 12a3a55..1d2f3d8 100644
--- a/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
+++ b/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -374,6 +374,27 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
prefsPrivate->setAuthorAndUserStylesEnabled(flag);
}
+void LayoutTestController::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 LayoutTestController::setCustomPolicyDelegate(bool setDelegate, bool permissive)
{
COMPtr<IWebView> webView;
@@ -411,6 +432,12 @@ void LayoutTestController::setGeolocationPermission(bool allow)
setGeolocationPermissionCommon(allow);
}
+int LayoutTestController::numberOfPendingGeolocationPermissionRequests()
+{
+ // FIXME: Implement for Geolocation layout tests.
+ return -1;
+}
+
void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
{
// FIXME: Implement for speech input layout tests.
@@ -922,12 +949,23 @@ bool LayoutTestController::isCommandEnabled(JSStringRef /*name*/)
void LayoutTestController::clearAllApplicationCaches()
{
- // FIXME: implement to support Application Cache quotas.
+ // FIXME: Implement to support application cache quotas.
+}
+
+void LayoutTestController::clearApplicationCacheForOrigin(JSStringRef origin)
+{
+ // FIXME: Implement to support deleting all application cache for an origin.
}
void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
{
- // FIXME: implement to support Application Cache quotas.
+ // FIXME: Implement to support application cache quotas.
+}
+
+JSValueRef LayoutTestController::originsWithApplicationCache(JSContextRef context)
+{
+ // FIXME: Implement to get origins that have application caches.
+ return JSValueMakeUndefined(context);
}
void LayoutTestController::clearAllDatabases()
@@ -1418,6 +1456,12 @@ bool LayoutTestController::hasSpellingMarker(int from, int length)
return ret;
}
+bool LayoutTestController::hasGrammarMarker(int from, int length)
+{
+ // FIXME: Implement this.
+ return false;
+}
+
void LayoutTestController::dumpConfigurationForViewport(int /*deviceDPI*/, int /*deviceWidth*/, int /*deviceHeight*/, int /*availableWidth*/, int /*availableHeight*/)
{
// FIXME: Implement this.
@@ -1428,6 +1472,32 @@ void LayoutTestController::setSerializeHTTPLoads(bool)
// FIXME: Implement.
}
+void LayoutTestController::syncLocalStorage()
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::observeStorageTrackerNotifications(unsigned number)
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::deleteAllLocalStorage()
+{
+ // FIXME: Implement.
+}
+
+JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
+{
+ // FIXME: Implement.
+ return JSValueMakeUndefined(context);
+}
+
+void LayoutTestController::deleteLocalStorageForOrigin(JSStringRef URL)
+{
+ // FIXME: Implement.
+}
+
void LayoutTestController::setMinimumTimerInterval(double minimumTimerInterval)
{
COMPtr<IWebView> webView;
@@ -1440,3 +1510,5 @@ void LayoutTestController::setMinimumTimerInterval(double minimumTimerInterval)
viewPrivate->setMinimumTimerInterval(minimumTimerInterval);
}
+
+
diff --git a/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp b/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
index a95aa50..c45ea0e 100644
--- a/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
+++ b/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
@@ -207,6 +207,11 @@ void LayoutTestController::setAuthorAndUserStylesEnabled(bool flag)
// FIXME: implement
}
+void LayoutTestController::setAutofilled(JSContextRef, JSValueRef element, bool isAutofilled)
+{
+ // FIXME: implement
+}
+
void LayoutTestController::setPopupBlockingEnabled(bool popupBlockingEnabled)
{
// FIXME: implement
@@ -240,12 +245,23 @@ void LayoutTestController::clearPersistentUserStyleSheet()
void LayoutTestController::clearAllApplicationCaches()
{
- // FIXME: implement to support Application Cache quotas.
+ // FIXME: Implement to support application cache quotas.
+}
+
+void LayoutTestController::clearApplicationCacheForOrigin(JSStringRef url)
+{
+ // FIXME: Implement to support deleting all application cache for an origin.
}
void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
{
- // FIXME: implement to support Application Cache quotas.
+ // FIXME: Implement to support application cache quotas.
+}
+
+JSValueRef LayoutTestController::originsWithApplicationCache(JSContextRef context)
+{
+ // FIXME: Implement to get origins that have application caches.
+ return 0;
}
void LayoutTestController::clearAllDatabases()
@@ -325,6 +341,12 @@ void LayoutTestController::setGeolocationPermission(bool allow)
setGeolocationPermissionCommon(allow);
}
+int LayoutTestController::numberOfPendingGeolocationPermissionRequests()
+{
+ // FIXME: Implement for Geolocation layout tests.
+ return -1;
+}
+
void LayoutTestController::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
{
// FIXME: Implement for speech input layout tests.
@@ -516,6 +538,12 @@ bool LayoutTestController::hasSpellingMarker(int, int)
return false;
}
+bool LayoutTestController::hasGrammarMarker(int, int)
+{
+ // FIXME: Implement
+ return false;
+}
+
void LayoutTestController::dumpConfigurationForViewport(int /*deviceDPI*/, int /*deviceWidth*/, int /*deviceHeight*/, int /*availableWidth*/, int /*availableHeight*/)
{
// FIXME: Implement
@@ -558,4 +586,29 @@ void LayoutTestController::setSerializeHTTPLoads(bool)
void LayoutTestController::setMinimumTimerInterval(double interval) {
}
-
+
+void LayoutTestController::syncLocalStorage()
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::observeStorageTrackerNotifications(unsigned number)
+{
+ // FIXME: Implement.
+}
+
+void LayoutTestController::deleteAllLocalStorage()
+{
+ // FIXME: Implement.
+}
+
+JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)
+{
+ // FIXME: Implement.
+ return 0;
+}
+
+void LayoutTestController::deleteLocalStorageForOrigin(JSStringRef URL)
+{
+ // FIXME: Implement.
+}
diff --git a/Tools/EWebLauncher/main.c b/Tools/EWebLauncher/main.c
index 4a9e1ba..3bb27a2 100644
--- a/Tools/EWebLauncher/main.c
+++ b/Tools/EWebLauncher/main.c
@@ -822,7 +822,7 @@ main(int argc, char *argv[])
char *engine = NULL;
char *theme = NULL;
- char *backingStore = (char *)backingStores[0];
+ char *backingStore = (char *)backingStores[1];
unsigned char quitOption = 0;
unsigned char isFlattening = 0;
diff --git a/Tools/FindSafari/FindSafari.vcproj b/Tools/FindSafari/FindSafari.vcproj
index e2beb9f..12fbc7b 100644
--- a/Tools/FindSafari/FindSafari.vcproj
+++ b/Tools/FindSafari/FindSafari.vcproj
@@ -17,7 +17,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\FindSafariCommon.vsprops"
+ InheritedPropertySheets=".\FindSafariDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -78,7 +78,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\FindSafariCommon.vsprops"
+ InheritedPropertySheets=".\FindSafariRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -139,7 +139,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\FindSafariCommon.vsprops"
+ InheritedPropertySheets=".\FindSafariDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -198,9 +198,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\FindSafariCommon.vsprops"
+ InheritedPropertySheets=".\FindSafariProduction.vsprops"
CharacterSet="1"
>
<Tool
@@ -261,7 +261,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\FindSafariCommon.vsprops"
+ InheritedPropertySheets=".\FindSafariReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -322,7 +322,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\FindSafariCommon.vsprops"
+ InheritedPropertySheets=".\FindSafariDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -383,7 +383,7 @@
<Configuration
Name="Release_PGO|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\FindSafariCommon.vsprops"
+ InheritedPropertySheets=".\FindSafariReleasePGO.vsprops"
CharacterSet="1"
>
<Tool
diff --git a/Tools/FindSafari/FindSafariDebug.vsprops b/Tools/FindSafari/FindSafariDebug.vsprops
new file mode 100644
index 0000000..4babd3c
--- /dev/null
+++ b/Tools/FindSafari/FindSafariDebug.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafariDebug"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ .\FindSafariCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/FindSafari/FindSafariDebugAll.vsprops b/Tools/FindSafari/FindSafariDebugAll.vsprops
new file mode 100644
index 0000000..67a087d
--- /dev/null
+++ b/Tools/FindSafari/FindSafariDebugAll.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafariDebugAll"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;
+ .\FindSafariCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/FindSafari/FindSafariDebugCairoCFLite.vsprops b/Tools/FindSafari/FindSafariDebugCairoCFLite.vsprops
new file mode 100644
index 0000000..e445dbd
--- /dev/null
+++ b/Tools/FindSafari/FindSafariDebugCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafariDebugCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;
+ .\FindSafariCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/FindSafari/FindSafariProduction.vsprops b/Tools/FindSafari/FindSafariProduction.vsprops
new file mode 100644
index 0000000..c2d3e36
--- /dev/null
+++ b/Tools/FindSafari/FindSafariProduction.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafariProduction"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ .\FindSafariCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/FindSafari/FindSafariRelease.vsprops b/Tools/FindSafari/FindSafariRelease.vsprops
new file mode 100644
index 0000000..9d59b3d
--- /dev/null
+++ b/Tools/FindSafari/FindSafariRelease.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafariRelease"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ .\FindSafariCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/FindSafari/FindSafariReleaseCairoCFLite.vsprops b/Tools/FindSafari/FindSafariReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..fccbb9c
--- /dev/null
+++ b/Tools/FindSafari/FindSafariReleaseCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafariReleaseCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\FindSafariCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/FindSafari/FindSafariReleasePGO.vsprops b/Tools/FindSafari/FindSafariReleasePGO.vsprops
new file mode 100644
index 0000000..6c24cbc
--- /dev/null
+++ b/Tools/FindSafari/FindSafariReleasePGO.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="FindSafariReleasePGO"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ .\FindSafariCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/GNUmakefile.am b/Tools/GNUmakefile.am
index 87f5429..6de1af5 100644
--- a/Tools/GNUmakefile.am
+++ b/Tools/GNUmakefile.am
@@ -180,6 +180,7 @@ TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \
+ Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp \
diff --git a/Tools/MiniBrowser/Configurations/Base.xcconfig b/Tools/MiniBrowser/Configurations/Base.xcconfig
index abe65dd..bb091e3 100644
--- a/Tools/MiniBrowser/Configurations/Base.xcconfig
+++ b/Tools/MiniBrowser/Configurations/Base.xcconfig
@@ -49,12 +49,23 @@ TARGET_GCC_VERSION_1050_ = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_ACTUAL));
TARGET_GCC_VERSION_1050_0310 = GCC_42;
TARGET_GCC_VERSION_1050_0320 = GCC_42;
TARGET_GCC_VERSION_1060 = GCC_42;
-TARGET_GCC_VERSION_1070 = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070 = $(TARGET_GCC_VERSION_1070_$(CONFIGURATION));
+TARGET_GCC_VERSION_1070_Debug = LLVM_COMPILER;
+TARGET_GCC_VERSION_1070_Release = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070_Production = LLVM_GCC_42;
GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
GCC_VERSION_GCC_40 = 4.0;
GCC_VERSION_GCC_42 = 4.2;
GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
+GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0;
+
+// FIXME: Disable C++ exceptions in the LLVM Compiler once it supports enabling Obj-C exceptions without C++ exceptions.
+GCC_ENABLE_CPP_EXCEPTIONS = $(GCC_ENABLE_CPP_EXCEPTIONS_$(TARGET_GCC_VERSION));
+GCC_ENABLE_CPP_EXCEPTIONS_GCC_40 = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_GCC_42 = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_LLVM_GCC = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_LLVM_COMPILER = YES;
// If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK.
SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops
new file mode 100644
index 0000000..33dee17
--- /dev/null
+++ b/Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserDebug"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ .\MiniBrowserCoreFoundation.vsprops;
+ .\MiniBrowserCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops
new file mode 100644
index 0000000..37501d1
--- /dev/null
+++ b/Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserDebugAll"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;
+ .\MiniBrowserCoreFoundation.vsprops;
+ .\MiniBrowserCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops
new file mode 100644
index 0000000..a632f29
--- /dev/null
+++ b/Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserDebugCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;
+ .\MiniBrowserCFLite.vsprops;
+ .\MiniBrowserCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops
new file mode 100644
index 0000000..75195e3
--- /dev/null
+++ b/Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserProduction"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ .\MiniBrowserCoreFoundation.vsprops;
+ .\MiniBrowserCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops
new file mode 100644
index 0000000..27af48a
--- /dev/null
+++ b/Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserRelease"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ .\MiniBrowserCoreFoundation.vsprops;
+ .\MiniBrowserCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops b/Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..a50d5b7
--- /dev/null
+++ b/Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="MiniBrowserReleaseCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\MiniBrowserCFLite.vsprops;
+ .\MiniBrowserCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/MiniBrowser/MiniBrowser.vcproj b/Tools/MiniBrowser/MiniBrowser.vcproj
index 3d94dbc..4b7b8fc 100644
--- a/Tools/MiniBrowser/MiniBrowser.vcproj
+++ b/Tools/MiniBrowser/MiniBrowser.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\Configurations\MiniBrowserCoreFoundation.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ InheritedPropertySheets=".\Configurations\MiniBrowserDebug.vsprops"
UseOfATL="1"
CharacterSet="1"
>
@@ -80,7 +80,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\Configurations\MiniBrowserCoreFoundation.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ InheritedPropertySheets=".\Configurations\MiniBrowserRelease.vsprops"
UseOfATL="1"
CharacterSet="1"
>
@@ -142,7 +142,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\Configurations\MiniBrowserCoreFoundation.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ InheritedPropertySheets=".\Configurations\MiniBrowserDebugAll.vsprops"
UseOfATL="1"
CharacterSet="1"
>
@@ -204,7 +204,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\Configurations\MiniBrowserCFLite.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ InheritedPropertySheets=".\Configurations\MiniBrowserDebugCairoCFLite.vsprops"
UseOfATL="1"
CharacterSet="1"
>
@@ -266,7 +266,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\Configurations\MiniBrowserCFLite.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ InheritedPropertySheets=".\Configurations\MiniBrowserReleaseCairoCFLite.vsprops"
UseOfATL="1"
CharacterSet="1"
>
@@ -326,9 +326,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\Configurations\MiniBrowserCoreFoundation.vsprops;.\Configurations\MiniBrowserCommon.vsprops"
+ InheritedPropertySheets=".\Configurations\MiniBrowserProduction.vsprops"
UseOfATL="1"
CharacterSet="1"
WholeProgramOptimization="1"
@@ -457,7 +457,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
>
<Tool
Name="VCCLCompilerTool"
diff --git a/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj b/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
index 1a7ccbb..24fc0e8 100644
--- a/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
+++ b/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
@@ -7,6 +7,8 @@
objects = {
/* Begin PBXBuildFile section */
+ 0F7EB6E3134113C300F4D865 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F7EB6E2134113C300F4D865 /* WebKit.framework */; };
+ 0F7EB879134113F200F4D865 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F7EB6E2134113C300F4D865 /* WebKit.framework */; };
256AC3DA0F4B6AC300CF3369 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 256AC3D90F4B6AC300CF3369 /* AppDelegate.m */; };
51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 51E244F911EFCE07008228D1 /* MBToolbarItem.m */; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
@@ -48,8 +50,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 0F7EB6E2134113C300F4D865 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
- 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
1DDD58150DA1D0A300B32029 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainMenu.xib; path = mac/MainMenu.xib; sourceTree = "<group>"; };
256AC3D80F4B6AC300CF3369 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = mac/AppDelegate.h; sourceTree = "<group>"; };
256AC3D90F4B6AC300CF3369 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = mac/AppDelegate.m; sourceTree = "<group>"; };
@@ -85,6 +87,7 @@
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
BC8FB5A8116AA1FE0080D413 /* WebKit2.framework in Frameworks */,
+ 0F7EB6E3134113C300F4D865 /* WebKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -92,6 +95,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 0F7EB879134113F200F4D865 /* WebKit.framework in Frameworks */,
BC20545E11C96C92008F3375 /* Cocoa.framework in Frameworks */,
BCBD384411B08AAD00E01E54 /* WebKit2.framework in Frameworks */,
);
@@ -121,6 +125,7 @@
isa = PBXGroup;
children = (
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ 0F7EB6E2134113C300F4D865 /* WebKit.framework */,
BC8FB5A7116AA1FE0080D413 /* WebKit2.framework */,
);
name = "Linked Frameworks";
@@ -130,7 +135,6 @@
isa = PBXGroup;
children = (
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
- 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
);
name = "Other Frameworks";
diff --git a/Tools/MiniBrowser/mac/BrowserWindowController.m b/Tools/MiniBrowser/mac/BrowserWindowController.m
index 5c4efef..1f6fc04 100644
--- a/Tools/MiniBrowser/mac/BrowserWindowController.m
+++ b/Tools/MiniBrowser/mac/BrowserWindowController.m
@@ -648,6 +648,7 @@ static void runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParameters
0, // printFrame
0, // showModal
0, // didCompleteRubberBandForMainFrame
+ 0, // saveDataToFileInDownloadsFolder
};
WKPageSetPageUIClient(_webView.pageRef, &uiClient);
}
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.cpp b/Tools/MiniBrowser/qt/BrowserWindow.cpp
index 67d5696..53f7de9 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/Tools/MiniBrowser/qt/BrowserWindow.cpp
@@ -61,6 +61,9 @@ BrowserWindow::BrowserWindow(QWKContext* context, WindowOptions* options)
connect(m_browser->view(), SIGNAL(titleChanged(const QString&)), SLOT(setWindowTitle(const QString&)));
connect(m_browser->view(), SIGNAL(urlChanged(const QUrl&)), SLOT(urlChanged(const QUrl&)));
+ if (m_windowOptions.printLoadedUrls)
+ connect(page(), SIGNAL(urlChanged(QUrl)), this, SLOT(printURL(QUrl)));
+
this->setCentralWidget(m_browser);
m_browser->setFocus(Qt::OtherFocusReason);
@@ -332,6 +335,12 @@ void BrowserWindow::showUserAgentDialog()
page()->setCustomUserAgent(combo->currentText());
}
+void BrowserWindow::printURL(const QUrl& url)
+{
+ QTextStream output(stdout);
+ output << "Loaded: " << url.toString() << endl;
+}
+
void BrowserWindow::toggleDisableJavaScript(bool enable)
{
page()->preferences()->setAttribute(QWKPreferences::JavascriptEnabled, !enable);
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.h b/Tools/MiniBrowser/qt/BrowserWindow.h
index c79b2d0..6ad8f27 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.h
+++ b/Tools/MiniBrowser/qt/BrowserWindow.h
@@ -69,6 +69,8 @@ protected slots:
void toggleFrameFlattening(bool);
void showUserAgentDialog();
+ void printURL(const QUrl&);
+
void toggleAutoLoadImages(bool);
void toggleDisableJavaScript(bool);
diff --git a/Tools/MiniBrowser/qt/MiniBrowser.pro b/Tools/MiniBrowser/qt/MiniBrowser.pro
index 0038823..809c934 100644
--- a/Tools/MiniBrowser/qt/MiniBrowser.pro
+++ b/Tools/MiniBrowser/qt/MiniBrowser.pro
@@ -56,6 +56,8 @@ contains(QT_CONFIG, opengl) {
DEFINES += QT_CONFIGURED_WITH_OPENGL
}
+DEFINES -= QT_ASCII_CAST_WARNINGS
+
# We copy the resource file to the build directory.
# The copier is defined in Tools/MiniBrowser/DerivedSources.pro.
RESOURCES += \
diff --git a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
index d68d299..f40c870 100644
--- a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
+++ b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
@@ -60,6 +60,7 @@ void MiniBrowserApplication::handleUserOptions()
<< "[-robot-extra-time seconds]"
<< "[-chunked-drawing-area]"
<< "[-separate-web-process-per-window]"
+ << "[-print-loaded-urls]"
<< "URLs";
appQuit(0);
}
@@ -92,4 +93,7 @@ void MiniBrowserApplication::handleUserOptions()
if (args.contains("-separate-web-process-per-window"))
m_windowOptions.useSeparateWebProcessPerWindow = true;
+
+ if (args.contains("-print-loaded-urls"))
+ m_windowOptions.printLoadedUrls = true;
}
diff --git a/Tools/MiniBrowser/qt/MiniBrowserApplication.h b/Tools/MiniBrowser/qt/MiniBrowserApplication.h
index 45dbde9..5a78820 100644
--- a/Tools/MiniBrowser/qt/MiniBrowserApplication.h
+++ b/Tools/MiniBrowser/qt/MiniBrowserApplication.h
@@ -36,11 +36,13 @@ struct WindowOptions {
WindowOptions()
: useTiledBackingStore(true)
, useSeparateWebProcessPerWindow(false)
+ , printLoadedUrls(false)
{
}
bool useTiledBackingStore;
bool useSeparateWebProcessPerWindow;
+ bool printLoadedUrls;
};
class MiniBrowserApplication : public QApplication {
diff --git a/Tools/QtTestBrowser/QtTestBrowser.pro b/Tools/QtTestBrowser/QtTestBrowser.pro
index 6c8cdf4..4cd7ecb 100644
--- a/Tools/QtTestBrowser/QtTestBrowser.pro
+++ b/Tools/QtTestBrowser/QtTestBrowser.pro
@@ -26,6 +26,7 @@ CONFIG += uitools
isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
include(../../Source/WebKit.pri)
+INCLUDEPATH += ../../Source/WebKit/qt/WebCoreSupport
DESTDIR = $$OUTPUT_DIR/bin
!CONFIG(standalone_package): CONFIG -= app_bundle
@@ -33,6 +34,11 @@ DESTDIR = $$OUTPUT_DIR/bin
QT += network
macx:QT+=xml
+unix:!mac:!symbian {
+ CONFIG += link_pkgconfig
+ PKGCONFIG += fontconfig
+}
+
linux-* {
# From Creator's src/rpath.pri:
# Do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
@@ -57,5 +63,7 @@ contains(QT_CONFIG, opengl) {
DEFINES += QT_CONFIGURED_WITH_OPENGL
}
+DEFINES -= QT_ASCII_CAST_WARNINGS
+
RESOURCES += \
QtTestBrowser.qrc
diff --git a/Tools/QtTestBrowser/QtTestBrowser.qrc b/Tools/QtTestBrowser/QtTestBrowser.qrc
index ffe77b0..b6036e8 100644
--- a/Tools/QtTestBrowser/QtTestBrowser.qrc
+++ b/Tools/QtTestBrowser/QtTestBrowser.qrc
@@ -1,5 +1,6 @@
<RCC>
<qresource prefix="/">
<file>useragentlist.txt</file>
+ <file>favicon.png</file>
</qresource>
</RCC>
diff --git a/Tools/QtTestBrowser/favicon.png b/Tools/QtTestBrowser/favicon.png
new file mode 100644
index 0000000..4462752
--- /dev/null
+++ b/Tools/QtTestBrowser/favicon.png
Binary files differ
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index d76ad3a..f4db898 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -108,6 +108,10 @@ void LauncherWindow::initializeView()
m_view = view;
} else {
WebViewGraphicsBased* view = new WebViewGraphicsBased(splitter);
+ m_view = view;
+#if defined(QT_CONFIGURED_WITH_OPENGL)
+ toggleQGLWidgetViewport(m_windowOptions.useQGLWidgetViewport);
+#endif
view->setPage(page());
connect(view, SIGNAL(currentFPSUpdated(int)), this, SLOT(updateFPS(int)));
@@ -116,8 +120,6 @@ void LauncherWindow::initializeView()
// The implementation of QAbstractScrollArea::eventFilter makes us need
// to install the event filter also on the viewport of a QGraphicsView.
view->viewport()->installEventFilter(this);
-
- m_view = view;
}
m_touchMocking = false;
@@ -128,6 +130,9 @@ void LauncherWindow::initializeView()
this, SLOT(showLinkHover(const QString&, const QString&)));
connect(this, SIGNAL(enteredFullScreenMode(bool)), this, SLOT(toggleFullScreenMode(bool)));
+ if (m_windowOptions.printLoadedUrls)
+ connect(page()->mainFrame(), SIGNAL(urlChanged(QUrl)), this, SLOT(printURL(QUrl)));
+
applyPrefs();
splitter->addWidget(m_inspector);
@@ -895,6 +900,12 @@ void LauncherWindow::showUserAgentDialog()
delete dialog;
}
+void LauncherWindow::printURL(const QUrl& url)
+{
+ QTextStream output(stdout);
+ output << "Loaded: " << url.toString() << endl;
+}
+
void LauncherWindow::updateFPS(int fps)
{
QString fpsStatusText = QString("Current FPS: %1").arg(fps);
diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h
index 0b8e87d..8bdad4d 100644
--- a/Tools/QtTestBrowser/launcherwindow.h
+++ b/Tools/QtTestBrowser/launcherwindow.h
@@ -61,13 +61,13 @@
#include <qx11info_x11.h>
#endif
+#include "DumpRenderTreeSupportQt.h"
#include "mainwindow.h"
#include "urlloader.h"
#include "utils.h"
#include "webinspector.h"
#include "webpage.h"
#include "webview.h"
-#include "../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h"
#ifdef Q_WS_MAEMO_5
#include <X11/Xatom.h>
@@ -100,6 +100,10 @@ public:
#if defined(QT_CONFIGURED_WITH_OPENGL)
, useQGLWidgetViewport(false)
#endif
+#if defined(Q_WS_X11)
+ , useTestFonts(false)
+#endif
+ , printLoadedUrls(false)
{
}
@@ -119,6 +123,10 @@ public:
#if defined(QT_CONFIGURED_WITH_OPENGL)
bool useQGLWidgetViewport;
#endif
+#if defined(Q_WS_X11)
+ bool useTestFonts;
+#endif
+ bool printLoadedUrls;
QUrl inspectorUrl;
quint16 remoteInspectorPort;
};
@@ -186,6 +194,8 @@ protected slots:
void showFPS(bool enable);
void showUserAgentDialog();
+ void printURL(const QUrl&);
+
public slots:
LauncherWindow* newWindow();
LauncherWindow* cloneWindow();
diff --git a/Tools/QtTestBrowser/locationedit.cpp b/Tools/QtTestBrowser/locationedit.cpp
index 85bd222..04a6018 100644
--- a/Tools/QtTestBrowser/locationedit.cpp
+++ b/Tools/QtTestBrowser/locationedit.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2011 Andreas Kling <kling@webkit.org>
*
* All rights reserved.
*
@@ -29,12 +30,35 @@
#ifndef QT_NO_INPUTDIALOG
+static const QSize gPageIconSize(16, 16);
+
+static QPixmap defaultPageIcon()
+{
+ static QPixmap icon;
+ if (icon.isNull())
+ icon.load(":/favicon.png");
+
+ return icon;
+}
+
LocationEdit::LocationEdit(QWidget* parent)
: QLineEdit(parent)
, m_progress(0)
{
m_clearTimer.setSingleShot(true);
connect(&m_clearTimer, SIGNAL(timeout()), this, SLOT(reset()));
+
+ m_pageIconLabel = new QLabel(this);
+ m_pageIconLabel->setFixedSize(gPageIconSize);
+ m_pageIconLabel->setPixmap(defaultPageIcon());
+}
+
+void LocationEdit::setPageIcon(const QIcon& icon)
+{
+ if (icon.isNull())
+ m_pageIconLabel->setPixmap(defaultPageIcon());
+ else
+ m_pageIconLabel->setPixmap(icon.pixmap(gPageIconSize));
}
void LocationEdit::setProgress(int progress)
@@ -49,6 +73,30 @@ void LocationEdit::reset()
setProgress(0);
}
+void LocationEdit::resizeEvent(QResizeEvent*)
+{
+ updateInternalGeometry();
+}
+
+void LocationEdit::updateInternalGeometry()
+{
+ QStyleOptionFrameV3 styleOption;
+ initStyleOption(&styleOption);
+
+ QRect textRect = style()->subElementRect(QStyle::SE_LineEditContents, &styleOption, this);
+
+ const int spacing = 2;
+
+ int x = textRect.x() + spacing;
+ int y = (textRect.center().y() + 1) - gPageIconSize.height() / 2;
+
+ m_pageIconLabel->move(x, y);
+
+ QMargins margins = textMargins();
+ margins.setLeft(m_pageIconLabel->sizeHint().width() + spacing);
+ setTextMargins(margins);
+}
+
void LocationEdit::paintEvent(QPaintEvent* ev)
{
QColor backgroundColor = QApplication::palette().color(QPalette::Base);
diff --git a/Tools/QtTestBrowser/locationedit.h b/Tools/QtTestBrowser/locationedit.h
index 962b422..e8afe70 100644
--- a/Tools/QtTestBrowser/locationedit.h
+++ b/Tools/QtTestBrowser/locationedit.h
@@ -39,6 +39,8 @@ class LocationEdit : public QLineEdit {
public:
LocationEdit(QWidget* parent = 0);
+ void setPageIcon(const QIcon&);
+
public slots:
void setProgress(int progress);
@@ -48,10 +50,14 @@ private slots:
protected:
virtual void paintEvent(QPaintEvent*);
virtual void focusInEvent(QFocusEvent*);
+ virtual void resizeEvent(QResizeEvent*);
private:
+ void updateInternalGeometry();
+
int m_progress;
QTimer m_clearTimer;
+ QLabel* m_pageIconLabel;
};
#endif
diff --git a/Tools/QtTestBrowser/main.cpp b/Tools/QtTestBrowser/main.cpp
index eecd9c3..059269c 100644
--- a/Tools/QtTestBrowser/main.cpp
+++ b/Tools/QtTestBrowser/main.cpp
@@ -35,8 +35,68 @@
WindowOptions windowOptions;
+
+#include <QDir>
+#include <QFile>
+#include <QFileInfo>
+#include <QFontDatabase>
+
+
+#if defined(Q_WS_X11)
+#include <fontconfig/fontconfig.h>
+#endif
+
+
+#if defined(Q_WS_X11)
+// Very similar to WebCore::DumpRenderTree::initializeFonts();
+// Duplicated here so that QtTestBrowser would display contents
+// with the same fonts as run-webkit-tests/DumpRenderTree.
+static void initTestFonts()
+{
+ static int numFonts = -1;
+
+ // Some test cases may add or remove application fonts (via @font-face).
+ // Make sure to re-initialize the font set if necessary.
+ FcFontSet* appFontSet = FcConfigGetFonts(0, FcSetApplication);
+ if (appFontSet && numFonts >= 0 && appFontSet->nfont == numFonts)
+ return;
+
+ QByteArray fontDir = getenv("WEBKIT_TESTFONTS");
+ if (fontDir.isEmpty() || !QDir(fontDir).exists()) {
+ fprintf(stderr,
+ "\n\n"
+ "----------------------------------------------------------------------\n"
+ "WEBKIT_TESTFONTS environment variable is not set correctly.\n"
+ "This variable has to point to the directory containing the fonts\n"
+ "you can clone from git://gitorious.org/qtwebkit/testfonts.git\n"
+ "----------------------------------------------------------------------\n"
+ );
+ exit(1);
+ }
+ // Looks for qt/fonts.conf relative to the directory of the QtTestBrowser
+ // executable.
+ QString configFileString = QCoreApplication::applicationDirPath();
+ configFileString += "/../../../Tools/DumpRenderTree/qt/fonts.conf";
+ QByteArray configFileArray = configFileString.toUtf8();
+ FcConfig* config = FcConfigCreate();
+ if (!FcConfigParseAndLoad (config, (FcChar8*) configFileArray.data(), true))
+ qFatal("Couldn't load font configuration file");
+ if (!FcConfigAppFontAddDir (config, (FcChar8*) fontDir.data()))
+ qFatal("Couldn't add font dir!");
+ FcConfigSetCurrent(config);
+
+ appFontSet = FcConfigGetFonts(config, FcSetApplication);
+ numFonts = appFontSet->nfont;
+}
+#endif
+
int launcherMain(const QApplication& app)
{
+#ifdef Q_WS_X11
+ if (windowOptions.useTestFonts)
+ initTestFonts();
+#endif
+
#ifndef NDEBUG
int retVal = app.exec();
DumpRenderTreeSupportQt::garbageCollectorCollect();
@@ -117,6 +177,10 @@ void LauncherApplication::handleUserOptions()
qDebug() << "Usage:" << programName.toLatin1().data()
<< "[-graphicsbased]"
<< "[-no-compositing]"
+#if defined(QT_CONFIGURED_WITH_OPENGL)
+ << "[-gl-viewport]"
+ << "[-webgl]"
+#endif
<< QString("[-viewport-update-mode %1]").arg(formatKeys(updateModes)).toLatin1().data()
<< "[-cache-webview]"
<< "[-show-fps]"
@@ -130,6 +194,10 @@ void LauncherApplication::handleUserOptions()
<< "[-offline-storage-database-enabled]"
<< "[-offline-web-application-cache-enabled]"
<< "[-set-offline-storage-default-quota maxSize]"
+#if defined(Q_WS_X11)
+ << "[-use-test-fonts]"
+#endif
+ << "[-print-loaded-urls]"
<< "URLs";
appQuit(0);
}
@@ -200,8 +268,21 @@ void LauncherApplication::handleUserOptions()
requiresGraphicsView("-gl-viewport");
windowOptions.useQGLWidgetViewport = true;
}
+
+ if (args.contains("-webgl")) {
+ requiresGraphicsView("-webgl");
+ windowOptions.useWebGL = true;
+ }
#endif
+#if defined(Q_WS_X11)
+ if (args.contains("-use-test-fonts"))
+ windowOptions.useTestFonts = true;
+#endif
+
+ if (args.contains("-print-loaded-urls"))
+ windowOptions.printLoadedUrls = true;
+
QString inspectorUrlArg("-inspector-url");
int inspectorUrlIndex = args.indexOf(inspectorUrlArg);
if (inspectorUrlIndex != -1)
diff --git a/Tools/QtTestBrowser/mainwindow.cpp b/Tools/QtTestBrowser/mainwindow.cpp
index e2ea41d..dcd350d 100644
--- a/Tools/QtTestBrowser/mainwindow.cpp
+++ b/Tools/QtTestBrowser/mainwindow.cpp
@@ -84,8 +84,9 @@ void MainWindow::buildUI()
connect(page(), SIGNAL(loadProgress(int)), urlEdit, SLOT(setProgress(int)));
#endif
- connect(page()->mainFrame(), SIGNAL(titleChanged(const QString&)),
- this, SLOT(setWindowTitle(const QString&)));
+ connect(page()->mainFrame(), SIGNAL(loadStarted()), this, SLOT(onLoadStarted()));
+ connect(page()->mainFrame(), SIGNAL(iconChanged()), this, SLOT(onIconChanged()));
+ connect(page()->mainFrame(), SIGNAL(titleChanged(QString)), this, SLOT(onTitleChanged(QString)));
connect(page(), SIGNAL(windowCloseRequested()), this, SLOT(close()));
#ifndef QT_NO_SHORTCUT
@@ -219,3 +220,25 @@ void MainWindow::openLocation()
urlEdit->setFocus();
#endif
}
+
+void MainWindow::onIconChanged()
+{
+#ifndef QT_NO_INPUTDIALOG
+ urlEdit->setPageIcon(page()->mainFrame()->icon());
+#endif
+}
+
+void MainWindow::onLoadStarted()
+{
+#ifndef QT_NO_INPUTDIALOG
+ urlEdit->setPageIcon(QIcon());
+#endif
+}
+
+void MainWindow::onTitleChanged(const QString& title)
+{
+ if (title.isEmpty())
+ setWindowTitle(QCoreApplication::applicationName());
+ else
+ setWindowTitle(QString::fromLatin1("%1 - %2").arg(title).arg(QCoreApplication::applicationName()));
+}
diff --git a/Tools/QtTestBrowser/mainwindow.h b/Tools/QtTestBrowser/mainwindow.h
index 08fa81e..f8baebc 100644
--- a/Tools/QtTestBrowser/mainwindow.h
+++ b/Tools/QtTestBrowser/mainwindow.h
@@ -58,6 +58,9 @@ protected slots:
void openFile();
void openLocation();
void changeLocation();
+ void onIconChanged();
+ void onLoadStarted();
+ void onTitleChanged(const QString&);
protected:
QString addressUrl() const;
diff --git a/Tools/Scripts/build-jsc b/Tools/Scripts/build-jsc
index c9d4134..bdabd5a 100755
--- a/Tools/Scripts/build-jsc
+++ b/Tools/Scripts/build-jsc
@@ -69,8 +69,12 @@ if (isAppleMacWebKit()) {
$result = buildVisualStudioProject("JavaScriptCore.vcproj/JavaScriptCore.sln");
} elsif (isGtk()) {
$result = buildGtkProject("JavaScriptCore");
-} elsif (isQt() or isWx()) {
- # Qt builds everything in one-shot. No need to build anything here.
+} elsif (isQt()) {
+ # Remove duplicated --qt options to avoid passing them to qmake
+ checkForArgumentAndRemoveFromARGV("--qt");
+ $result = buildQMakeProject("JavaScriptCore", 0, @ARGV);
+} elsif (isWx()) {
+ # Builds 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-webkit b/Tools/Scripts/build-webkit
index d5b4777..8ff638d 100755
--- a/Tools/Scripts/build-webkit
+++ b/Tools/Scripts/build-webkit
@@ -3,6 +3,7 @@
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
# Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2010 moiji-mobile.com All rights reserved.
+# Copyright (C) 2011 Research In Motion Limited. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -41,6 +42,7 @@ use webkitdirs;
use webkitperl::features;
use POSIX;
+sub cMakeArgsFromFeatures();
sub checkForJavaSDK();
sub formatBuildTime($);
sub writeCongrats();
@@ -50,12 +52,13 @@ chdirWebKit();
my $showHelp = 0;
my $clean = 0;
+my $useGYP = 0;
my $minimal = 0;
my $v8 = 0;
my $installHeaders;
my $installLibs;
my $prefixPath;
-my $makeArgs;
+my $makeArgs = "";
my $noWebKit2 = 0;
my $startTime = time();
@@ -87,6 +90,7 @@ my (
$linkPrefetchSupport,
$mathmlSupport,
$mediaStatisticsSupport,
+ $mediaStreamSupport,
$meterTagSupport,
$netscapePluginSupport,
$notificationsSupport,
@@ -203,6 +207,9 @@ my @features = (
{ option => "media-statistics", desc => "Toggle Media Statistics support",
define => "ENABLE_MEDIA_STATISTICS", default => 0, value => \$mediaStatisticsSupport },
+ { option => "media-stream", desc => "Toggle Media Stream API support (implies Blob support, currently Chromium only)",
+ define => "ENABLE_MEDIA_STREAM", default => isChromium(), value => \$mediaStreamSupport },
+
{ option => "meter-tag", desc => "Meter Tag support",
define => "ENABLE_METER_TAG", default => !isAppleWinWebKit(), value => \$meterTagSupport },
@@ -324,6 +331,7 @@ $svgSupport = $svgSupport || $svgAnimationSupport || $svgAsImageSupport
|| $svgDOMObjCBindingsSupport || $svgFontsSupport
|| $svgForeignObjectSupport || $svgUseSupport;
+$blobSupport = $blobSupport || $mediaStreamSupport;
my $programName = basename($0);
my $usage = <<EOF;
@@ -331,6 +339,8 @@ 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
+ --dsym Change debugging format to dwarf-with-dsym (Mac only)
--chromium Build the Chromium port on Mac/Win/Linux
--efl Build the EFL port
@@ -347,6 +357,7 @@ Usage: $programName [options] [options to pass to build system]
--prefix=<path> Set installation prefix to the given path (Gtk/Efl only)
--makeargs=<arguments> Optional Makefile flags
+ --qmakearg=<arguments> Optional qmake flags (Qt only, e.g. --qmakearg="CONFIG+=webkit2" to build WebKit2)
--minimal No optional features, unless explicitly enabled.
@@ -355,6 +366,7 @@ EOF
my %options = (
'help' => \$showHelp,
'clean' => \$clean,
+ 'gyp' => \$useGYP,
'install-headers=s' => \$installHeaders,
'install-libs=s' => \$installLibs,
'prefix=s' => \$prefixPath,
@@ -409,6 +421,11 @@ for my $dir (@projects, @otherDirs) {
}
}
+# 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
@@ -419,7 +436,7 @@ if (isGtk()) {
}
push @options, "--prefix=" . $prefixPath if defined($prefixPath);
- push @options, "--makeargs=" . $makeArgs if defined($makeArgs);
+ push @options, "--makeargs=" . $makeArgs if $makeArgs;
} elsif (isAppleMacWebKit()) {
checkForJavaSDK();
push @options, XcodeOptions();
@@ -487,7 +504,7 @@ if (isGtk()) {
@options = @ARGV;
push @options, "--install-headers=" . $installHeaders if defined($installHeaders);
push @options, "--install-libs=" . $installLibs if defined($installLibs);
- push @options, "--makeargs=" . $makeArgs if defined($makeArgs);
+ push @options, "--makeargs=" . $makeArgs if $makeArgs;
foreach (@features) {
push @options, "DEFINES+=$_->{define}=${$_->{value}}" if ${$_->{value}} != $_->{default};
@@ -511,10 +528,7 @@ if (isInspectorFrontend()) {
if (isWx()) {
downloadWafIfNeeded();
- @options = ();
- if (defined($makeArgs)) {
- @options = split(/ /, $makeArgs);
- }
+ @options = split(/ /, $makeArgs);
@projects = ();
my $result = buildWafProject('.', $clean, @options);
exit exitStatus($result) if exitStatus($result);
@@ -529,34 +543,13 @@ if (isChromium()) {
}
if (isEfl()) {
- @options = ();
- @projects = ();
- foreach (@features) {
- my $featureName = $_->{define};
- if ($featureName) {
- my $featureEnabled = ${$_->{value}} ? "ON" : "OFF";
- push @options, "-D$featureName=$featureEnabled";
- }
- }
- push @options, "--makeargs=" . $makeArgs if defined($makeArgs);
- push @options, "--prefix=" . $prefixPath if defined($prefixPath);
- my $result = buildCMakeEflProject($clean, @options);
- exit exitStatus($result) if exitStatus($result);
+ # By default we build using all of the available CPUs.
+ $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
+ buildCMakeProjectOrExit($clean, "Efl", $prefixPath, $makeArgs, cMakeArgsFromFeatures());
}
if (isWinCE()) {
- @options = ();
- @projects = ();
- foreach (@features) {
- my $featureName = $_->{define};
- if ($featureName) {
- my $featureEnabled = ${$_->{value}} ? "ON" : "OFF";
- push @options, "-D$featureName=$featureEnabled";
- }
- }
- push @options, "--makeargs=" . $makeArgs if defined($makeArgs);
- my $result = buildCMakeWinCEProject("STANDARDSDK_500 (ARMV4I)", $clean, @options);
- exit exitStatus($result) if exitStatus($result);
+ buildCMakeProjectOrExit($clean, "WinCE", $prefixPath, $makeArgs, ("-DCMAKE_WINCE_SDK=\"STANDARDSDK_500 (ARMV4I)\"", cMakeArgsFromFeatures()));
}
# Build, and abort if the build fails.
@@ -579,7 +572,9 @@ for my $dir (@projects) {
} elsif (isAppleMacWebKit()) {
my @local_options = @options;
push @local_options, XcodeCoverageSupportOptions() if $coverageSupport && $project ne "ANGLE";
- $result = buildXCodeProject($project, $clean, @local_options, @ARGV);
+ my $useGYPProject = $useGYP && ($project =~ "WebCore|JavaScriptCore|JavaScriptGlue");
+ my $projectPath = $useGYPProject ? "gyp/$project" : $project;
+ $result = buildXCodeProject($projectPath, $clean, @local_options, @ARGV);
} elsif (isAppleWinWebKit()) {
if ($project eq "WebKit") {
$result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);
@@ -613,6 +608,19 @@ writeCongrats();
exit 0;
+sub cMakeArgsFromFeatures()
+{
+ my @args;
+ foreach (@features) {
+ my $featureName = $_->{define};
+ if ($featureName) {
+ my $featureEnabled = ${$_->{value}} ? "ON" : "OFF";
+ push @args, "-D$featureName=$featureEnabled";
+ }
+ }
+ return @args;
+}
+
sub checkForJavaSDK()
{
my $jniHeader = "/System/Library/Frameworks/JavaVM.framework/Headers/jni.h";
diff --git a/Tools/Scripts/check-inspector-strings b/Tools/Scripts/check-inspector-strings
index 0350aca..dd850aa 100755
--- a/Tools/Scripts/check-inspector-strings
+++ b/Tools/Scripts/check-inspector-strings
@@ -40,10 +40,15 @@ 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")
+def decode_unicode_escapes(s):
+ xNN_converted_to_u00NN = s.replace("\\x", "\\u00")
+ return eval("ur\"" + xNN_converted_to_u00NN + "\"")
+
class StringsExtractor(ProcessorBase):
def __init__(self, patterns):
self._patterns = patterns
@@ -54,9 +59,6 @@ class StringsExtractor(ProcessorBase):
def should_process(self, file_path):
return file_path.endswith(".js") and (not file_path.endswith("InjectedScript.js"))
- def decode_unicode_escapes(self, s):
- return eval("ur\"" + s + "\"")
-
def process(self, lines, file_path, line_numbers=None):
for line in lines:
comment_start = line.find("//")
@@ -66,7 +68,7 @@ class StringsExtractor(ProcessorBase):
for pattern in self._patterns:
line_strings = re.findall(pattern, line)
for string in line_strings:
- self.strings[index].append(self.decode_unicode_escapes(string))
+ self.strings[index].append(decode_unicode_escapes(string))
index += 1
class LocalizedStringsExtractor:
@@ -81,7 +83,7 @@ class LocalizedStringsExtractor:
for line in lines:
match = re.match(r"localizedStrings\[\"((?:[^\"\\]|\\.)*?)\"", line)
if match:
- self.localized_strings.append(match.group(1))
+ self.localized_strings.append(decode_unicode_escapes(match.group(1)))
finally:
localized_strings_file.close()
@@ -99,7 +101,7 @@ if __name__ == "__main__":
strings_extractor = StringsExtractor([r"WebInspector\.(?:UIString|formatLocalized)\(\"((?:[^\"\\]|\\.)*?)\"", r"\"((?:[^\"\\]|\\.)*?)\""])
file_reader = TextFileReader(strings_extractor)
- file_reader.process_paths([_inspector_directory])
+ file_reader.process_paths([_inspector_directory, _devtools_directory])
localized_strings_extractor = LocalizedStringsExtractor()
localized_strings_extractor.process_file(_localized_strings)
ui_strings = frozenset(strings_extractor.strings[0])
diff --git a/Tools/Scripts/do-webcore-rename b/Tools/Scripts/do-webcore-rename
index 6dbfc1f..da08cf7 100755
--- a/Tools/Scripts/do-webcore-rename
+++ b/Tools/Scripts/do-webcore-rename
@@ -125,8 +125,6 @@ my %renamesContemplatedForTheFuture = (
"KURLMac" => "URLMac",
"KURL_h" => "URL_h",
- "ThreadSafeSharedBase" => "ThreadSafeRefCountedBase",
- "ThreadSafeShared" => "ThreadSafeRefCounted",
"TreeShared" => "TreeRefCounted",
"StringImpl" => "SharedString",
diff --git a/Tools/Scripts/extract-localizable-strings b/Tools/Scripts/extract-localizable-strings
index b31550a..116f11f 100755
--- a/Tools/Scripts/extract-localizable-strings
+++ b/Tools/Scripts/extract-localizable-strings
@@ -51,11 +51,13 @@ my %isDebugMacro = ( ASSERT_WITH_MESSAGE => 1, LOG_ERROR => 1, ERROR => 1, NSURL
@ARGV >= 2 or die "Usage: extract-localizable-strings <exceptions file> <file to update> [ directory... ]\nDid you mean to run update-webkit-localizable-strings instead?\n";
my $exceptionsFile = shift @ARGV;
--f $exceptionsFile or die "Couldn't find exceptions file $exceptionsFile\n";
+-f $exceptionsFile or die "Couldn't find exceptions file $exceptionsFile\n" unless $exceptionsFile eq "-";
my $fileToUpdate = shift @ARGV;
-f $fileToUpdate or die "Couldn't find file to update $fileToUpdate\n";
+my $warnAboutUnlocalizedStrings = $exceptionsFile ne "-";
+
my @directories = ();
my @directoriesToSkip = ();
if (@ARGV < 1) {
@@ -80,7 +82,7 @@ my $NSLocalizeCount = 0;
my %exception;
my %usedException;
-if (open EXCEPTIONS, $exceptionsFile) {
+if ($exceptionsFile ne "-" && open EXCEPTIONS, $exceptionsFile) {
while (<EXCEPTIONS>) {
chomp;
if (/^"([^\\"]|\\.)*"$/ or /^[-_\/\w.]+.(h|m|mm|c|cpp)$/ or /^[-_\/\w.]+.(h|m|mm|c|cpp):"([^\\"]|\\.)*"$/) {
@@ -105,7 +107,7 @@ for my $dir (@directoriesToSkip) {
my @files = ( split "\n", `find $quotedDirectoriesString \\( -name "*.h" -o -name "*.m" -o -name "*.mm" -o -name "*.c" -o -name "*.cpp" \\)` );
for my $file (sort @files) {
- next if $file =~ /\/\w+LocalizableStrings\.h$/;
+ next if $file =~ /\/\w+LocalizableStrings\w*\.h$/;
$file =~ s-^./--;
@@ -167,7 +169,7 @@ handleString:
# FIXME: Validate UTF-8 here?
$UIString = $string;
$expected = ",";
- } elsif (($macro =~ /UI_STRING_KEY$/) and !defined $key) {
+ } elsif (($macro =~ /UI_STRING_KEY(_INTERNAL)?$/) and !defined $key) {
# FIXME: Validate UTF-8 here?
$key = $string;
$expected = ",";
@@ -192,7 +194,7 @@ handleString:
} elsif ($exception{"$file:\"$string\""}) {
$usedException{"$file:\"$string\""} = 1;
} else {
- print "$file:$stringLine:\"$string\" is not marked for localization\n";
+ print "$file:$stringLine:\"$string\" is not marked for localization\n" if $warnAboutUnlocalizedStrings;
$notLocalizedCount++;
}
}
@@ -226,7 +228,7 @@ handleString:
$sawError = 1;
$expected = "";
}
- if ($token =~ /UI_STRING(_KEY)?$/) {
+ if ($token =~ /UI_STRING(_KEY)?(_INTERNAL)?$/) {
$expected = "(";
$macro = $token;
$UIString = undef;
diff --git a/Tools/Scripts/generate-project-files b/Tools/Scripts/generate-project-files
new file mode 100755
index 0000000..60a32e1
--- /dev/null
+++ b/Tools/Scripts/generate-project-files
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+
+# 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.
+# 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.
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use webkitdirs;
+
+chdirWebKit();
+
+# This simple wrapper exists so that the configure logic can live in the Source directory.
+# This allows building from Source without a copy of Tools (as Apple's internal builds do).
+system("python", "Source/gyp/configure", @ARGV) == 0 or die "Failed to run Source/gyp/configure";
diff --git a/Tools/Scripts/new-run-webkit-httpd b/Tools/Scripts/new-run-webkit-httpd
index f6ec164..4122993 100755
--- a/Tools/Scripts/new-run-webkit-httpd
+++ b/Tools/Scripts/new-run-webkit-httpd
@@ -65,7 +65,8 @@ def run(options):
tempfile.gettempdir(),
port=options.port,
root=options.root,
- run_background=options.run_background)
+ run_background=options.run_background,
+ layout_tests_dir=options.layout_tests_dir)
if options.server == 'start':
httpd.start()
else:
@@ -85,6 +86,9 @@ def main():
option_parser.add_option('--run_background', action="store_true",
dest="run_background",
help='Run on background (for running as UI test)')
+ option_parser.add_option('--layout_tests_dir',
+ dest="layout_tests_dir",
+ help='Absolute path to LayoutTests root')
options, args = option_parser.parse_args()
# FIXME: Make this work with other ports as well.
diff --git a/Tools/Scripts/old-run-webkit-tests b/Tools/Scripts/old-run-webkit-tests
index a0c9d21..fe9bdd0 100755
--- a/Tools/Scripts/old-run-webkit-tests
+++ b/Tools/Scripts/old-run-webkit-tests
@@ -49,6 +49,7 @@
use strict;
use warnings;
+use CGI;
use Config;
use Cwd;
use Data::Dumper;
@@ -139,7 +140,7 @@ my $ignoreMetrics = 0;
my $webSocketPort = 8880;
# wss is disabled until all platforms support pyOpenSSL.
# my $webSocketSecurePort = 9323;
-my $ignoreTests = '';
+my @ignoreTests;
my $iterations = 1;
my $launchSafari = 1;
my $mergeDepth;
@@ -187,6 +188,7 @@ $testHTTP = 0 if (isWx());
my $perlInterpreter = "perl";
my $expectedTag = "expected";
+my $mismatchTag = "mismatch";
my $actualTag = "actual";
my $prettyDiffTag = "pretty-diff";
my $diffsTag = "diffs";
@@ -329,7 +331,7 @@ my $getOptionsResult = GetOptions(
'http!' => \$testHTTP,
'wait-for-httpd!' => \$shouldWaitForHTTPD,
'ignore-metrics!' => \$ignoreMetrics,
- 'ignore-tests|i=s' => \$ignoreTests,
+ 'ignore-tests|i=s' => \@ignoreTests,
'iterations=i' => \$iterations,
'launch-safari!' => \$launchSafari,
'leaks|l' => \$shouldCheckLeaks,
@@ -544,6 +546,9 @@ if (!$hasAcceleratedCompositing) {
# compositing is enabled.
$ignoredFiles{'svg/custom/use-on-symbol-inside-pattern.svg'} = 1;
+ # This test has an iframe that is put in a layer only in compositing mode.
+ $ignoredFiles{'media/media-document-audio-repaint.html'} = 1;
+
if (isAppleWebKit()) {
# In Apple's ports, the default controls for <video> contain a "full
# screen" button only if accelerated compositing is enabled.
@@ -594,7 +599,7 @@ if (!checkWebCoreFeatureSupport("XHTMLMP", 0)) {
$ignoredDirectories{'fast/xhtmlmp'} = 1;
}
-processIgnoreTests($ignoreTests, "ignore-tests") if $ignoreTests;
+processIgnoreTests(join(',', @ignoreTests), "ignore-tests") if @ignoreTests;
if (!$ignoreSkipped) {
if (!$skippedOnly || @ARGV == 0) {
readSkippedFiles("");
@@ -1246,6 +1251,7 @@ sub countAndPrintLeaks($$$)
"getVMInitArgs", # <rdar://problem/7714444> leak in Java
"Java_java_lang_System_initProperties", # <rdar://problem/7714465> leak in Java
"glrCompExecuteKernel", # <rdar://problem/7815391> leak in graphics driver while using OpenGL
+ "NSNumberFormatter getObjectValue:forString:errorDescription:", # <rdar://problem/7149350> Leak in NSNumberFormatter
);
}
@@ -1679,7 +1685,14 @@ sub expectedDirectoryForTest($;$;$)
my ($base, $isText, $expectedExtension) = @_;
my @directories = @platformResultHierarchy;
- push @directories, map { catdir($platformBaseDirectory, $_) } qw(mac-snowleopard mac) if isAppleWinWebKit();
+
+ my @extraPlatforms = ();
+ if (isAppleWinWebKit()) {
+ push @extraPlatforms, "mac-wk2" if $platform eq "win-wk2";
+ push @extraPlatforms, qw(mac-snowleopard mac);
+ }
+
+ push @directories, map { catdir($platformBaseDirectory, $_) } @extraPlatforms;
push @directories, $expectedDirectory;
# If we already have expected results, just return their location.
@@ -2046,7 +2059,7 @@ sub linksForErrorTest
my $crashLogText = "crash log";
if (my $crashLocation = crashLocation($base)) {
- $crashLogText .= " (<code>" . $crashLocation . "</code>)";
+ $crashLogText .= " (<code>" . CGI::escapeHTML($crashLocation) . "</code>)";
}
push @links, @{linksForExpectedAndActualResults($base)};
@@ -2446,6 +2459,16 @@ sub readSkippedFiles($)
my @testsFound;
+sub isUsedInReftest
+{
+ my $filename = $_;
+ if ($filename =~ /-$expectedTag(-$mismatchTag)?\.html$/) {
+ return 1;
+ }
+ my $base = stripExtension($filename);
+ return (-f "$base-$expectedTag.html" || -f "$base-$expectedTag-$mismatchTag.html");
+}
+
sub directoryFilter
{
return () if exists $ignoredLocalDirectories{basename($File::Find::dir)};
@@ -2457,7 +2480,8 @@ sub fileFilter
{
my $filename = $_;
if ($filename =~ /\.([^.]+)$/) {
- if (exists $supportedFileExtensions{$1}) {
+ my $extension = $1;
+ if (exists $supportedFileExtensions{$extension} && !isUsedInReftest($filename)) {
my $path = File::Spec->abs2rel(catfile($File::Find::dir, $filename), $testDirectory);
push @testsFound, $path if !exists $ignoredFiles{$path};
}
diff --git a/Tools/Scripts/read-checksum-from-png b/Tools/Scripts/read-checksum-from-png
new file mode 100755
index 0000000..ab08b25
--- /dev/null
+++ b/Tools/Scripts/read-checksum-from-png
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+# 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 __future__ import with_statement
+import sys
+
+from webkitpy.layout_tests import read_checksum_from_png
+
+
+if '__main__' == __name__:
+ for filename in sys.argv[1:]:
+ with open(filename, 'r') as filehandle:
+ print "%s: %s" % (read_checksum_from_png.read_checksum(filehandle), filename)
diff --git a/Tools/Scripts/run-gtk-tests b/Tools/Scripts/run-gtk-tests
index 9a57319..43c73c2 100644
--- a/Tools/Scripts/run-gtk-tests
+++ b/Tools/Scripts/run-gtk-tests
@@ -32,4 +32,17 @@ my @unitTests = glob $productDir . "/Programs/unittests/*";
if ($#unitTests < 1) {
die "ERROR: tests not found in $productDir.\n";
}
-system "gtester -k @unitTests"
+
+my $exitStatus = 0;
+foreach my $unitTest (@unitTests)
+{
+ system "gtester $unitTest";
+ if ($?) {
+ $exitStatus = $?;
+ }
+}
+
+if ($exitStatus) {
+ print "Tests failed\n";
+ exit $exitStatus;
+}
diff --git a/Tools/Scripts/show-pretty-diff b/Tools/Scripts/show-pretty-diff
new file mode 100755
index 0000000..2a17d3f
--- /dev/null
+++ b/Tools/Scripts/show-pretty-diff
@@ -0,0 +1,77 @@
+#!/usr/bin/perl -w
+
+# 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.
+
+use strict;
+use FindBin;
+use File::Temp qw(tempfile);
+use lib $FindBin::Bin;
+use webkitdirs;
+
+my $inputPath = "";
+if ($ARGV[0]) {
+ $inputPath = $ARGV[0]
+} else {
+ # Create a temporary file for STDIN.
+ # FIXME: We can probably avoid putting this on the disk by directly piping
+ # to prettify.rb via IPC::Open2.
+ my $inputTempFileHandle;
+ ($inputTempFileHandle, $inputPath) = tempfile(
+ "inputtemp-XXXXXXXX",
+ DIR => File::Spec->tmpdir(),
+ SUFFIX => ".diff",
+ UNLINK => 0,
+ );
+
+ while (<STDIN>) {
+ print $inputTempFileHandle $_;
+ }
+
+ close($inputTempFileHandle);
+}
+
+# Create a temporary file for prettified patch.
+my ($prettydiffFileHandle, $prettydiffPath) = tempfile(
+ "prettydiff-XXXXXXXX",
+ DIR => File::Spec->tmpdir(),
+ SUFFIX => ".html",
+ UNLINK => 0,
+);
+close($prettydiffFileHandle);
+
+my $prettyPatchDir = sourceDir() . "/Websites/bugs.webkit.org/PrettyPatch/";
+my $prettyPatchTool = sourceDir() . "/Websites/bugs.webkit.org/PrettyPatch/prettify.rb";
+
+my $pathToPrettify = "ruby -I " . sourceDir() . "/Websites/bugs.webkit.org/PrettyPatch/ " . sourceDir() . "/Websites/bugs.webkit.org/PrettyPatch/prettify.rb";
+system "$pathToPrettify $inputPath > $prettydiffPath";
+
+if (isAppleMacWebKit()) {
+ system "open", $prettydiffPath;
+} elsif (isCygwin()) {
+ system "cygstart",$prettydiffPath;
+} elsif (isWindows()) {
+ system "start", $prettydiffPath;
+} else {
+ print "Created prettified diff at " . $prettydiffPath . ".";
+}
diff --git a/Tools/Scripts/update-webkit b/Tools/Scripts/update-webkit
index c6e54f3..5c132ae 100755
--- a/Tools/Scripts/update-webkit
+++ b/Tools/Scripts/update-webkit
@@ -45,6 +45,7 @@ sub runGitUpdate();
# Handle options
my $quiet = '';
my $showHelp;
+my $useGYP = 0;
determineIsChromium();
@@ -53,6 +54,7 @@ chdirWebKit();
my $getOptionsResult = GetOptions(
'h|help' => \$showHelp,
'q|quiet' => \$quiet,
+ 'gyp' => \$useGYP,
);
if (!$getOptionsResult || $showHelp) {
@@ -61,6 +63,7 @@ Usage: @{[ basename($0) ]} [options]
--chromium also update dependencies of the chromium port
-h|--help show the help message
-q|--quiet pass -q to svn update for quiet updates
+ --gyp generate project files from gyp after update
__END__
exit 1;
}
@@ -97,6 +100,11 @@ 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-localizable-strings b/Tools/Scripts/update-webkit-localizable-strings
index 4baa8d6..0a0ada9 100755
--- a/Tools/Scripts/update-webkit-localizable-strings
+++ b/Tools/Scripts/update-webkit-localizable-strings
@@ -34,13 +34,18 @@ use FindBin;
use lib $FindBin::Bin;
use webkitdirs;
-my @directoriesToScan = ("Source/WebKit/mac", "Source/WebKit/win", "-Source/WebCore/icu", "-Source/WebKit/mac/icu");
-my $fileToUpdate = "Source/WebKit/English.lproj/Localizable.strings";
-my $exceptionsFile = "Source/WebKit/StringsNotToBeLocalized.txt";
+# WebKit and WebKit2 strings go into WebCore's Localizable.strings.
+my @directoriesToScan = ("Source/WebCore", "Source/WebKit/mac", "Source/WebKit2", "-Source/WebCore/icu", "-Source/WebKit/mac/icu");
+my $fileToUpdate = "Source/WebCore/English.lproj/Localizable.strings";
@ARGV == 0 or die "Usage: " . basename($0) . "\n";
chdirWebKit();
-system "sort -u $exceptionsFile -o $exceptionsFile";
-exec "./Tools/Scripts/extract-localizable-strings", $exceptionsFile, $fileToUpdate, @directoriesToScan;
+system "Tools/Scripts/extract-localizable-strings", "-", $fileToUpdate, @directoriesToScan;
+
+# FIXME: the following can be removed and "Source/WebKit/win" added above once Windows uses WebCore's Localizable.strings. <rdar://problem/9119405>
+my @webKitDirectoriesToScan = ("Source/WebKit/win");
+my $webKitFileToUpdate = "Source/WebKit/English.lproj/Localizable.strings";
+
+system "Tools/Scripts/extract-localizable-strings", "-", $webKitFileToUpdate, @webKitDirectoriesToScan;
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index 1820f1e..d27caba 100644
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -1,5 +1,6 @@
# Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2011 Research In Motion Limited. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -59,6 +60,7 @@ my $configurationProductDir;
my $sourceDir;
my $currentSVNRevision;
my $osXVersion;
+my $generateDsym;
my $isQt;
my $qmakebin = "qmake"; # Allow override of the qmake binary from $PATH
my $isSymbian;
@@ -291,7 +293,7 @@ sub determineConfigurationForVisualStudio
{
return if defined $configurationForVisualStudio;
determineConfiguration();
- # FIXME: We should detect when Debug_All or Release_LTCG has been chosen.
+ # FIXME: We should detect when Debug_All or Production has been chosen.
$configurationForVisualStudio = $configuration;
}
@@ -388,12 +390,31 @@ sub currentSVNRevision
return $currentSVNRevision;
}
+sub generateDsym()
+{
+ determineGenerateDsym();
+ return $generateDsym;
+}
+
+sub determineGenerateDsym()
+{
+ return if defined($generateDsym);
+ $generateDsym = checkForArgumentAndRemoveFromARGV("--dsym");
+}
+
+sub argumentsForXcode()
+{
+ my @args = ();
+ push @args, "DEBUG_INFORMATION_FORMAT=dwarf-with-dsym" if generateDsym();
+ return @args;
+}
+
sub XcodeOptions
{
determineBaseProductDir();
determineConfiguration();
determineArchitecture();
- return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture");
+ return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture", argumentsForXcode());
}
sub XcodeOptionString
@@ -990,7 +1011,7 @@ sub isWindowsNT()
sub relativeScriptsDir()
{
- my $scriptDir = File::Spec->catpath("", File::Spec->abs2rel(dirname($0), getcwd()), "");
+ my $scriptDir = File::Spec->catpath("", File::Spec->abs2rel($FindBin::Bin, getcwd()), "");
if ($scriptDir eq "") {
$scriptDir = ".";
}
@@ -1476,95 +1497,84 @@ sub buildAutotoolsProject($@)
return $result;
}
-sub buildCMakeProject($@)
+sub generateBuildSystemFromCMakeProject
{
- my ($port, $clean, @buildParams) = @_;
- my $dir = File::Spec->canonpath(baseProductDir());
+ my ($port, $prefixPath, @cmakeArgs) = @_;
my $config = configuration();
- my $result;
- my $cmakeBuildArgs = "";
- my $makeArgs = "";
- my @buildArgs;
-
- if ($port =~ m/wince/i) {
- if ($config =~ m/debug/i) {
- $cmakeBuildArgs .= " --config Debug";
- } elsif ($config =~ m/release/i) {
- $cmakeBuildArgs .= " --config Release";
- }
- } else {
- $makeArgs .= " -j" . numberOfCPUs() if ($makeArgs !~ m/-j\s*\d+/);
- }
+ my $buildPath = File::Spec->catdir(baseProductDir(), $config);
+ File::Path::mkpath($buildPath) unless -d $buildPath;
+ my $originalWorkingDirectory = getcwd();
+ chdir($buildPath) or die;
- if ($clean) {
- print "Cleaning the build directory '$dir'\n";
- $dir = File::Spec->catfile($dir, $config);
- File::Path::remove_tree($dir, {keep_root => 1});
- $result = 0;
- } else {
- my $cmakebin = "cmake";
- my $cmakeBuildCommand = $cmakebin . " --build .";
-
- push @buildArgs, "-DPORT=$port";
-
- for my $i (0 .. $#buildParams) {
- my $opt = $buildParams[$i];
- if ($opt =~ /^--makeargs=(.*)/i ) {
- $makeArgs = $1;
- } elsif ($opt =~ /^--prefix=(.*)/i ) {
- push @buildArgs, "-DCMAKE_INSTALL_PREFIX=$1";
- } else {
- push @buildArgs, $opt;
- }
- }
-
- if ($config =~ m/debug/i) {
- push @buildArgs, "-DCMAKE_BUILD_TYPE=Debug";
- } elsif ($config =~ m/release/i) {
- push @buildArgs, "-DCMAKE_BUILD_TYPE=Release";
- }
-
- push @buildArgs, sourceDir() . "/Source";
-
- $dir = File::Spec->catfile($dir, $config);
- File::Path::mkpath($dir);
- chdir $dir or die "Failed to cd into " . $dir . "\n";
-
- print "Calling '$cmakebin @buildArgs' in " . $dir . "\n\n";
- my $result = system "$cmakebin @buildArgs";
- if ($result ne 0) {
- die "Failed while running $cmakebin to generate makefiles!\n";
- }
+ my @args;
+ push @args, "-DPORT=\"$port\"";
+ push @args, "-DCMAKE_INSTALL_PREFIX=\"$prefixPath\"" if $prefixPath;
+ if ($config =~ /release/i) {
+ push @args, "-DCMAKE_BUILD_TYPE=Release";
+ } elsif ($config =~ /debug/i) {
+ push @args, "-DCMAKE_BUILD_TYPE=Debug";
+ }
+ push @args, @cmakeArgs if @cmakeArgs;
+ push @args, '"' . File::Spec->catdir(sourceDir(), "Source") . '"';
- $cmakeBuildArgs .= " -- " . $makeArgs;
+ # We call system("cmake @args") instead of system("cmake", @args) so that @args is
+ # parsed for shell metacharacters.
+ my $returnCode = system("cmake @args");
- print "Calling '$cmakeBuildCommand $cmakeBuildArgs' in " . $dir . "\n\n";
- $result = system "$cmakeBuildCommand $cmakeBuildArgs";
- if ($result ne 0) {
- die "Failed to build $port port\n";
- }
+ chdir($originalWorkingDirectory);
+ return $returnCode;
+}
- chdir ".." or die;
+sub buildCMakeGeneratedProject($)
+{
+ my ($makeArgs) = @_;
+ my $config = configuration();
+ my $buildPath = File::Spec->catdir(baseProductDir(), $config);
+ if (! -d $buildPath) {
+ die "Must call generateBuildSystemFromCMakeProject() before building CMake project.";
}
+ my @args = ("--build", $buildPath, "--config", $config);
+ push @args, ("--", $makeArgs) if $makeArgs;
- return $result;
+ # 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.
+ return system("cmake @args");
}
-sub buildCMakeEflProject($@)
+sub cleanCMakeGeneratedProject()
{
- my ($clean, @buildArgs) = @_;
- return buildCMakeProject("Efl", $clean, @buildArgs);
+ my $config = configuration();
+ my $buildPath = File::Spec->catdir(baseProductDir(), $config);
+ if (-d $buildPath) {
+ return system("cmake", "--build", $buildPath, "--config", $config, "--target", "clean");
+ }
+ return 0;
}
-sub buildCMakeWinCEProject($@)
+sub buildCMakeProjectOrExit($$$$@)
{
- my ($sdk, $clean, @buildArgs) = @_;
- return buildCMakeProject("WinCE -DCMAKE_WINCE_SDK=\"" . $sdk . "\"", $clean, @buildArgs);
+ my ($clean, $port, $prefixPath, $makeArgs, @cmakeArgs) = @_;
+ my $returnCode;
+ if ($clean) {
+ $returnCode = exitStatus(cleanCMakeGeneratedProject());
+ exit($returnCode) if $returnCode;
+ }
+ $returnCode = exitStatus(generateBuildSystemFromCMakeProject($port, $prefixPath, @cmakeArgs));
+ exit($returnCode) if $returnCode;
+ $returnCode = exitStatus(buildCMakeGeneratedProject($makeArgs));
+ exit($returnCode) if $returnCode;
}
sub buildQMakeProject($@)
{
- my ($clean, @buildParams) = @_;
+ my ($project, $clean, @buildParams) = @_;
+
+ my @subdirs = ("JavaScriptCore", "WebCore", "WebKit/qt/Api");
+ if (grep { $_ eq $project } @subdirs) {
+ @subdirs = ($project);
+ } else {
+ $project = 0;
+ }
my @buildArgs = ("-r");
@@ -1610,6 +1620,9 @@ sub buildQMakeProject($@)
my @dsQmakeArgs = @buildArgs;
push @dsQmakeArgs, "-r";
push @dsQmakeArgs, sourceDir() . "/Source/DerivedSources.pro";
+ if ($project) {
+ push @dsQmakeArgs, "-after SUBDIRS=" . $project. "/DerivedSources.pro";
+ }
push @dsQmakeArgs, "-o Makefile.DerivedSources";
print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
my $result = system "$qmakebin @dsQmakeArgs";
@@ -1617,23 +1630,24 @@ sub buildQMakeProject($@)
die "Failed while running $qmakebin to generate derived sources!\n";
}
- # FIXME: Iterate over different source directories manually to workaround a problem with qmake+extraTargets+s60
- # To avoid overwriting of Makefile.DerivedSources in the root dir use Makefile.DerivedSources.Tools for Tools
- my @subdirs = ("JavaScriptCore", "WebCore", "WebKit/qt/Api");
- if (grep { $_ eq "CONFIG+=webkit2"} @buildArgs) {
- push @subdirs, "WebKit2";
- if ( -e sourceDir() ."/Tools/DerivedSources.pro" ) {
- @dsQmakeArgs = @buildArgs;
- push @dsQmakeArgs, "-r";
- push @dsQmakeArgs, sourceDir() . "/Tools/DerivedSources.pro";
- push @dsQmakeArgs, "-o Makefile.DerivedSources.Tools";
- print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
- my $result = system "$qmakebin @dsQmakeArgs";
- if ($result ne 0) {
- die "Failed while running $qmakebin to generate derived sources for Tools!\n";
+ if ($project ne "JavaScriptCore") {
+ # FIXME: Iterate over different source directories manually to workaround a problem with qmake+extraTargets+s60
+ # To avoid overwriting of Makefile.DerivedSources in the root dir use Makefile.DerivedSources.Tools for Tools
+ if (grep { $_ eq "CONFIG+=webkit2"} @buildArgs) {
+ push @subdirs, "WebKit2";
+ if ( -e sourceDir() ."/Tools/DerivedSources.pro" ) {
+ @dsQmakeArgs = @buildArgs;
+ push @dsQmakeArgs, "-r";
+ push @dsQmakeArgs, sourceDir() . "/Tools/DerivedSources.pro";
+ push @dsQmakeArgs, "-o Makefile.DerivedSources.Tools";
+ print "Calling '$qmakebin @dsQmakeArgs' in " . $dir . "\n\n";
+ my $result = system "$qmakebin @dsQmakeArgs";
+ if ($result ne 0) {
+ die "Failed while running $qmakebin to generate derived sources for Tools!\n";
+ }
+ push @subdirs, "MiniBrowser";
+ push @subdirs, "WebKitTestRunner";
}
- push @subdirs, "MiniBrowser";
- push @subdirs, "WebKitTestRunner";
}
}
@@ -1666,6 +1680,12 @@ sub buildQMakeProject($@)
}
}
+ if ($project) {
+ push @buildArgs, "-after SUBDIRS=" . $project . "/" . $project . ".pro ";
+ if ($project eq "JavaScriptCore") {
+ push @buildArgs, "-after SUBDIRS+=" . $project . "/jsc.pro ";
+ }
+ }
push @buildArgs, sourceDir() . "/Source/WebKit.pro";
print "Calling '$qmakebin @buildArgs' in " . $dir . "\n\n";
print "Installation headers directory: $installHeaders\n" if(defined($installHeaders));
@@ -1676,36 +1696,44 @@ sub buildQMakeProject($@)
die "Failed to setup build environment using $qmakebin!\n";
}
- $buildArgs[-1] = sourceDir() . "/Tools/Tools.pro";
- my $makefile = "Makefile.Tools";
+ my $makefile = "";
+ if (!$project) {
+ $buildArgs[-1] = sourceDir() . "/Tools/Tools.pro";
+ $makefile = "Makefile.Tools";
- # On Symbian qmake needs to run in the same directory where the pro file is located.
- if (isSymbian()) {
- $dir = $sourceDir . "/Tools";
- chdir $dir or die "Failed to cd into " . $dir . "\n";
- $makefile = "bld.inf";
- }
+ # On Symbian qmake needs to run in the same directory where the pro file is located.
+ if (isSymbian()) {
+ $dir = $sourceDir . "/Tools";
+ chdir $dir or die "Failed to cd into " . $dir . "\n";
+ $makefile = "bld.inf";
+ }
- print "Calling '$qmakebin @buildArgs -o $makefile' in " . $dir . "\n\n";
- $result = system "$qmakebin @buildArgs -o $makefile";
- if ($result ne 0) {
- die "Failed to setup build environment using $qmakebin!\n";
+ print "Calling '$qmakebin @buildArgs -o $makefile' in " . $dir . "\n\n";
+ $result = system "$qmakebin @buildArgs -o $makefile";
+ if ($result ne 0) {
+ die "Failed to setup build environment using $qmakebin!\n";
+ }
}
- # Manually create makefiles for the examples so we don't build by default
- my $examplesDir = $dir . "/WebKit/qt/examples";
- File::Path::mkpath($examplesDir);
- $buildArgs[-1] = sourceDir() . "/Source/WebKit/qt/examples/examples.pro";
- chdir $examplesDir or die;
- print "Calling '$qmakebin @buildArgs' in " . $examplesDir . "\n\n";
- $result = system "$qmakebin @buildArgs";
- die "Failed to create makefiles for the examples!\n" if $result ne 0;
- chdir $dir or die;
+ if (!$project) {
+ # Manually create makefiles for the examples so we don't build by default
+ my $examplesDir = $dir . "/WebKit/qt/examples";
+ File::Path::mkpath($examplesDir);
+ $buildArgs[-1] = sourceDir() . "/Source/WebKit/qt/examples/examples.pro";
+ chdir $examplesDir or die;
+ print "Calling '$qmakebin @buildArgs' in " . $examplesDir . "\n\n";
+ $result = system "$qmakebin @buildArgs";
+ die "Failed to create makefiles for the examples!\n" if $result ne 0;
+ chdir $dir or die;
+ }
- my $makeTools = "echo No Makefile for Tools. Skipping make";
+ my $makeTools = "echo";
+ if (!$project) {
+ $makeTools = "echo No Makefile for Tools. Skipping make";
- if (-e "$dir/$makefile") {
- $makeTools = "$make $makeargs -f $makefile";
+ if (-e "$dir/$makefile") {
+ $makeTools = "$make $makeargs -f $makefile";
+ }
}
if ($clean) {
@@ -1730,7 +1758,7 @@ sub buildQMakeQtProject($$@)
{
my ($project, $clean, @buildArgs) = @_;
- return buildQMakeProject($clean, @buildArgs);
+ return buildQMakeProject("", $clean, @buildArgs);
}
sub buildGtkProject
diff --git a/Tools/Scripts/webkitpy/common/checkout/api.py b/Tools/Scripts/webkitpy/common/checkout/api.py
index 170b822..5c21028 100644
--- a/Tools/Scripts/webkitpy/common/checkout/api.py
+++ b/Tools/Scripts/webkitpy/common/checkout/api.py
@@ -35,7 +35,7 @@ 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.net.bugzilla import parse_bug_id
+from webkitpy.common.net.bugzilla import parse_bug_id_from_changelog
from webkitpy.common.system.executive import Executive, run_command, ScriptError
from webkitpy.common.system.deprecated_logging import log
@@ -85,7 +85,7 @@ class Checkout(object):
return None
changelog_entry = changelog_entries[0]
changelog_data = {
- "bug_id": parse_bug_id(changelog_entry.contents()),
+ "bug_id": parse_bug_id_from_changelog(changelog_entry.contents()),
"author_name": changelog_entry.author_name(),
"author_email": changelog_entry.author_email(),
"author": changelog_entry.author(),
@@ -145,7 +145,7 @@ class Checkout(object):
def bug_id_for_this_commit(self, git_commit, changed_files=None):
try:
- return parse_bug_id(self.commit_message_for_this_commit(git_commit, changed_files).message())
+ return parse_bug_id_from_changelog(self.commit_message_for_this_commit(git_commit, changed_files).message())
except ScriptError, e:
pass # We might not have ChangeLogs.
diff --git a/Tools/Scripts/webkitpy/common/checkout/changelog.py b/Tools/Scripts/webkitpy/common/checkout/changelog.py
index ccdf9ca..a86b7a9 100644
--- a/Tools/Scripts/webkitpy/common/checkout/changelog.py
+++ b/Tools/Scripts/webkitpy/common/checkout/changelog.py
@@ -36,7 +36,7 @@ import textwrap
from webkitpy.common.system.deprecated_logging import log
from webkitpy.common.config.committers import CommitterList
-from webkitpy.common.net.bugzilla import parse_bug_id
+from webkitpy.common.net.bugzilla import parse_bug_id_from_changelog
class ChangeLogEntry(object):
@@ -87,7 +87,7 @@ class ChangeLogEntry(object):
return self._contents
def bug_id(self):
- return parse_bug_id(self._contents)
+ return parse_bug_id_from_changelog(self._contents)
# FIXME: Various methods on ChangeLog should move into ChangeLogEntry instead.
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm.py b/Tools/Scripts/webkitpy/common/checkout/scm.py
index 70f65b5..e436402 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm.py
@@ -29,6 +29,7 @@
#
# Python module for interacting with an SCM system (like SVN or Git)
+import logging
import os
import re
import sys
@@ -290,7 +291,7 @@ class SCM:
def revert_files(self, file_paths):
self._subclass_must_implement()
- def commit_with_message(self, message, username=None, git_commit=None, force_squash=False):
+ def commit_with_message(self, message, username=None, git_commit=None, force_squash=False, changed_files=None):
self._subclass_must_implement()
def svn_commit_log(self, svn_revision):
@@ -555,12 +556,8 @@ class SVN(SCM):
# FIXME: This should probably use cwd=self.checkout_root.
self.run(['svn', 'revert'] + file_paths)
- def commit_with_message(self, message, username=None, git_commit=None, force_squash=False):
+ def commit_with_message(self, message, username=None, git_commit=None, force_squash=False, changed_files=None):
# git-commit and force are not used by SVN.
- if self.dryrun:
- # Return a string which looks like a commit so that things which parse this output will succeed.
- return "Dry run, no commit.\nCommitted revision 0."
-
svn_commit_args = ["svn", "commit"]
if not username and not self.has_authorization_for_realm():
@@ -569,6 +566,17 @@ class SVN(SCM):
svn_commit_args.extend(["--username", username])
svn_commit_args.extend(["-m", message])
+
+ if changed_files:
+ svn_commit_args.extend(changed_files)
+
+ if self.dryrun:
+ _log = logging.getLogger("webkitpy.common.system")
+ _log.debug('Would run SVN command: "' + " ".join(svn_commit_args) + '"')
+
+ # Return a string which looks like a commit so that things which parse this output will succeed.
+ return "Dry run, no commit.\nCommitted revision 0."
+
# FIXME: Should this use cwd=self.checkout_root?
return self.run(svn_commit_args, error_handler=commit_error_handler)
@@ -826,7 +834,7 @@ class Git(SCM):
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)
- def commit_with_message(self, message, username=None, git_commit=None, force_squash=False):
+ def commit_with_message(self, message, username=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()
diff --git a/Tools/Scripts/webkitpy/common/config/build.py b/Tools/Scripts/webkitpy/common/config/build.py
index 355fa96..42d0721 100644
--- a/Tools/Scripts/webkitpy/common/config/build.py
+++ b/Tools/Scripts/webkitpy/common/config/build.py
@@ -33,17 +33,18 @@ def _should_file_trigger_build(target_platform, file):
# precendence over later ones.
# FIXME: The patterns below have only been verified to be correct on
- # Windows. We should implement this for other platforms and start using
- # it for their bots. Someone familiar with each platform will have to
- # figure out what the right set of directories/patterns is for that
- # platform.
- assert(target_platform == "win")
+ # the platforms listed below. We should implement this for other platforms
+ # and start using it for their bots. Someone familiar with each platform
+ # will have to figure out what the right set of directories/patterns is for
+ # that platform.
+ assert(target_platform in ("mac-leopard", "mac-snowleopard", "win"))
directories = [
# Directories that shouldn't trigger builds on any bots.
+ ("Examples", []),
("PerformanceTests", []),
("Source/WebCore/manual-tests", []),
- ("Examples", []),
+ ("Tools/BuildSlaveSupport/build.webkit.org-config/public_html", []),
("Websites", []),
("android", []),
("brew", []),
@@ -53,14 +54,13 @@ def _should_file_trigger_build(target_platform, file):
("opengl", []),
("opentype", []),
("openvg", []),
- ("wx", []),
("wince", []),
+ ("wx", []),
# Directories that should trigger builds on only some bots.
("Source/JavaScriptGlue", ["mac"]),
- ("LayoutTests/platform/mac", ["mac", "win"]),
- ("LayoutTests/platform/mac-snowleopard", ["mac-snowleopard", "win"]),
("Source/WebCore/image-decoders", ["chromium"]),
+ ("LayoutTests/platform/mac", ["mac", "win"]),
("cairo", ["gtk", "wincairo"]),
("cf", ["chromium-mac", "mac", "qt", "win"]),
("chromium", ["chromium"]),
@@ -72,7 +72,7 @@ def _should_file_trigger_build(target_platform, file):
("gtk", ["gtk"]),
("mac", ["chromium-mac", "mac"]),
("mac-leopard", ["mac-leopard"]),
- ("mac-snowleopard", ["mac-snowleopard"]),
+ ("mac-snowleopard", ["mac", "win"]),
("mac-wk2", ["mac-snowleopard", "win"]),
("objc", ["mac"]),
("qt", ["qt"]),
diff --git a/Tools/Scripts/webkitpy/common/config/build_unittest.py b/Tools/Scripts/webkitpy/common/config/build_unittest.py
index 1e075be..9144874 100644
--- a/Tools/Scripts/webkitpy/common/config/build_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/build_unittest.py
@@ -39,13 +39,13 @@ class ShouldBuildTest(unittest.TestCase):
(["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-snowleopard/foo"], ["mac-snowleopard", "win"]),
+ (["LayoutTests/platform/mac-snowleopard/foo"], ["mac-leopard", "mac-snowleopard", "win"]),
(["LayoutTests/platform/mac-wk2/Skipped"], ["mac-snowleopard", "win"]),
(["LayoutTests/platform/mac/foo"], ["mac-leopard", "mac-snowleopard", "win"]),
(["LayoutTests/platform/win-xp/foo"], ["win"]),
(["LayoutTests/platform/win-wk2/foo"], ["win"]),
(["LayoutTests/platform/win/foo"], ["win"]),
- (["Source/WebCore.exp.in", "Source/WebKit/mac/WebKit.exp"], ["mac"]),
+ (["Source/WebCore.exp.in", "Source/WebKit/mac/WebKit.exp"], ["mac-leopard", "mac-snowleopard"]),
(["Source/WebCore/mac/foo"], ["chromium-mac", "mac-leopard", "mac-snowleopard"]),
(["Source/WebCore/win/foo"], ["chromium-win", "win"]),
(["Source/WebCore/platform/graphics/gpu/foo"], ["mac-leopard", "mac-snowleopard"]),
@@ -53,13 +53,14 @@ class ShouldBuildTest(unittest.TestCase):
(["Source/WebCore/rendering/RenderThemeMac.mm", "Source/WebCore/rendering/RenderThemeMac.h"], ["mac-leopard", "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"], []),
]
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.
- for platform in ["win"]:
+ for platform in ["mac-leopard", "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)))
diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py
index 76f4741..fd9bdbb 100644
--- a/Tools/Scripts/webkitpy/common/config/committers.py
+++ b/Tools/Scripts/webkitpy/common/config/committers.py
@@ -71,6 +71,7 @@ committers_unable_to_review = [
Committer("Alejandro G. Castro", ["alex@igalia.com", "alex@webkit.org"]),
Committer("Alexander Kellett", ["lypanov@mac.com", "a-lists001@lypanov.net", "lypanov@kde.org"], "lypanov"),
Committer("Alexander Pavlov", "apavlov@chromium.org", "apavlov"),
+ Committer("Alexis Menard", ["alexis.menard@openbossa.org", "menard@kde.org"], "darktears"),
Committer("Andre Boule", "aboule@apple.com"),
Committer("Andrei Popescu", "andreip@google.com", "andreip"),
Committer("Andrew Wellington", ["andrew@webkit.org", "proton@wiretapped.net"], "proton"),
@@ -87,7 +88,6 @@ committers_unable_to_review = [
Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"], "otte"),
Committer("Brent Fulgham", "bfulgham@webkit.org", "bfulgham"),
Committer("Brett Wilson", "brettw@chromium.org", "brettx"),
- Committer("Brian Weinstein", "bweinstein@apple.com", "bweinstein"),
Committer("Cameron McCormack", "cam@webkit.org", "heycam"),
Committer("Carlos Garcia Campos", ["cgarcia@igalia.com", "carlosgc@gnome.org", "carlosgc@webkit.org"], "KaL"),
Committer("Carol Szabo", "carol.szabo@nokia.com"),
@@ -119,7 +119,7 @@ committers_unable_to_review = [
Committer("Girish Ramakrishnan", ["girish@forwardbias.in", "ramakrishnan.girish@gmail.com"]),
Committer("Graham Dennis", ["Graham.Dennis@gmail.com", "gdennis@webkit.org"]),
Committer("Greg Bolsinga", "bolsinga@apple.com"),
- Committer("Gyuyoung Kim", ["gyuyoung.kim@samsung.com", "gyuyoung@gmail.com", "gyuyoung@webkit.org"], "gyuyoung"),
+ Committer("Gyuyoung Kim", ["gyuyoung.kim@samsung.com", "gyuyoung.kim@webkit.org"], "gyuyoung"),
Committer("Hans Wennborg", "hans@chromium.org", "hwennborg"),
Committer("Hayato Ito", "hayato@chromium.org", "hayato"),
Committer("Helder Correia", "helder@sencha.com", "helder"),
@@ -142,7 +142,7 @@ committers_unable_to_review = [
Committer("Jochen Eisinger", "jochen@chromium.org", "jochen__"),
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("John Knottenbelt", "jknotten@chromium.org", "jknotten"),
Committer("Johnny Ding", ["jnd@chromium.org", "johnnyding.webkit@gmail.com"], "johnnyding"),
Committer("Joone Hur", ["joone.hur@collabora.co.uk", "joone@kldp.org", "joone@webkit.org"], "joone"),
Committer("Joost de Valk", ["joost@webkit.org", "webkit-dev@joostdevalk.nl"], "Altha"),
@@ -152,6 +152,7 @@ committers_unable_to_review = [
Committer("Justin Schuh", "jschuh@chromium.org", "jschuh"),
Committer("Keishi Hattori", "keishi@webkit.org", "keishi"),
Committer("Kelly Norton", "knorton@google.com"),
+ Committer("Kenji Imasaki", "imasaki@chromium.org", "imasaki"),
Committer("Kent Hansen", "kent.hansen@nokia.com", "khansen"),
Committer("Kimmo Kinnunen", ["kimmo.t.kinnunen@nokia.com", "kimmok@iki.fi", "ktkinnun@webkit.org"], "kimmok"),
Committer("Kinuko Yasuda", "kinuko@chromium.org", "kinuko"),
@@ -160,6 +161,7 @@ committers_unable_to_review = [
Committer("Leandro Pereira", ["leandro@profusion.mobi", "leandro@webkit.org"], "acidx"),
Committer("Levi Weintraub", ["leviw@chromium.org", "leviw@google.com", "lweintraub@apple.com"], "leviw"),
Committer("Lucas De Marchi", ["lucas.demarchi@profusion.mobi", "demarchi@webkit.org"], "demarchi"),
+ Committer("Lucas Forschler", ["lforschler@apple.com"], "lforschler"),
Committer("Luiz Agostini", ["luiz@webkit.org", "luiz.agostini@openbossa.org"], "lca"),
Committer("Mads Ager", "ager@chromium.org"),
Committer("Marcus Voltis Bulach", "bulach@chromium.org"),
@@ -238,6 +240,7 @@ reviewers_list = [
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("Brian Weinstein", "bweinstein@apple.com", "bweinstein"),
Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
Reviewer("Chris Blumenberg", "cblu@apple.com", "cblu"),
Reviewer("Chris Marrin", "cmarrin@apple.com", "cmarrin"),
diff --git a/Tools/Scripts/webkitpy/common/config/ports.py b/Tools/Scripts/webkitpy/common/config/ports.py
index 163d5ef..9a5a269 100644
--- a/Tools/Scripts/webkitpy/common/config/ports.py
+++ b/Tools/Scripts/webkitpy/common/config/ports.py
@@ -41,6 +41,10 @@ class WebKitPort(object):
def script_path(cls, script_name):
return os.path.join("Tools", "Scripts", script_name)
+ @classmethod
+ def script_shell_command(cls, script_name):
+ return [cls.script_path(script_name)]
+
@staticmethod
def port(port_name):
ports = {
@@ -76,11 +80,11 @@ class WebKitPort(object):
@classmethod
def update_webkit_command(cls):
- return [cls.script_path("update-webkit")]
+ return cls.script_shell_command("update-webkit")
@classmethod
def build_webkit_command(cls, build_style=None):
- command = [cls.script_path("build-webkit")]
+ command = cls.script_shell_command("build-webkit")
if build_style == "debug":
command.append("--debug")
if build_style == "release":
@@ -89,19 +93,19 @@ class WebKitPort(object):
@classmethod
def run_javascriptcore_tests_command(cls):
- return [cls.script_path("run-javascriptcore-tests")]
+ return cls.script_shell_command("run-javascriptcore-tests")
@classmethod
def run_webkit_tests_command(cls):
- return [cls.script_path("run-webkit-tests")]
+ return cls.script_shell_command("run-webkit-tests")
@classmethod
def run_python_unittests_command(cls):
- return [cls.script_path("test-webkitpy")]
+ return cls.script_shell_command("test-webkitpy")
@classmethod
def run_perl_unittests_command(cls):
- return [cls.script_path("test-webkitperl")]
+ return cls.script_shell_command("test-webkitperl")
@classmethod
def layout_tests_results_path(cls):
@@ -226,11 +230,10 @@ class ChromiumPort(WebKitPort):
@classmethod
def run_webkit_tests_command(cls):
- return [
- cls.script_path("new-run-webkit-tests"),
- "--chromium",
- "--no-pixel-tests",
- ]
+ command = cls.script_shell_command("new-run-webkit-tests")
+ command.append("--chromium")
+ command.append("--no-pixel-tests")
+ return command
@classmethod
def run_javascriptcore_tests_command(cls):
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/__init__.py b/Tools/Scripts/webkitpy/common/net/bugzilla/__init__.py
index cfaf3b1..bde67c6 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/__init__.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/__init__.py
@@ -2,7 +2,7 @@
# We only export public API here.
# FIXME: parse_bug_id should not be a free function.
-from .bugzilla import Bugzilla, parse_bug_id
+from .bugzilla import Bugzilla, parse_bug_id, parse_bug_id_from_changelog
# Unclear if Bug and Attachment need to be public classes.
from .bug import Bug
from .attachment import Attachment
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
index 17a8515..8daf92e 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
@@ -53,22 +53,34 @@ from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, SoupStrainer
def parse_bug_id(message):
if not message:
return None
- match = re.search("http\://webkit\.org/b/(?P<bug_id>\d+)", message)
+ match = re.search(Bugzilla.bug_url_short, message)
if match:
return int(match.group('bug_id'))
- match = re.search(
- Bugzilla.bug_server_regex + "show_bug\.cgi\?id=(?P<bug_id>\d+)",
- message)
+ match = re.search(Bugzilla.bug_url_long, message)
if match:
return int(match.group('bug_id'))
return None
+# FIXME: parse_bug_id_from_changelog should not be a free function.
+# Parse the bug ID out of a Changelog message based on the format that is
+# used by prepare-ChangeLog
+def parse_bug_id_from_changelog(message):
+ if not message:
+ return None
+ match = re.search("^\s*" + Bugzilla.bug_url_short + "$", message, re.MULTILINE)
+ if match:
+ return int(match.group('bug_id'))
+ match = re.search("^\s*" + Bugzilla.bug_url_long + "$", message, re.MULTILINE)
+ if match:
+ return int(match.group('bug_id'))
+ return None
+
def timestamp():
return datetime.now().strftime("%Y%m%d%H%M%S")
-# A container for all of the logic for making and parsing buzilla queries.
+# A container for all of the logic for making and parsing bugzilla queries.
class BugzillaQueries(object):
def __init__(self, bugzilla):
@@ -210,6 +222,8 @@ class Bugzilla(object):
bug_server_host = "bugs.webkit.org"
bug_server_regex = "https?://%s/" % re.sub('\.', '\\.', bug_server_host)
bug_server_url = "https://%s/" % bug_server_host
+ bug_url_long = bug_server_regex + r"show_bug\.cgi\?id=(?P<bug_id>\d+)(&ctype=xml)?"
+ bug_url_short = r"http\://webkit\.org/b/(?P<bug_id>\d+)"
def quips(self):
# We only fetch and parse the list of quips once per instantiation
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
index 1d08ca5..2e75ca9 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
@@ -30,7 +30,7 @@ import unittest
import datetime
import StringIO
-from .bugzilla import Bugzilla, BugzillaQueries, parse_bug_id
+from .bugzilla import Bugzilla, BugzillaQueries, parse_bug_id, parse_bug_id_from_changelog
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockBrowser
@@ -192,6 +192,33 @@ ZEZpbmlzaExvYWRXaXRoUmVhc29uOnJlYXNvbl07Cit9CisKIEBlbmQKIAogI2VuZGlmCg==
}],
}
+ def test_parse_bug_id_from_changelog(self):
+ commit_text = '''
+2011-03-23 Ojan Vafai <ojan@chromium.org>
+
+ Add failing result for WebKit2. All tests that require
+ focus fail on WebKit2. See https://bugs.webkit.org/show_bug.cgi?id=56988.
+
+ * platform/mac-wk2/fast/css/pseudo-any-expected.txt: Added.
+
+ '''
+
+ self.assertEquals(None, parse_bug_id_from_changelog(commit_text))
+
+ commit_text = '''
+2011-03-23 Ojan Vafai <ojan@chromium.org>
+
+ Add failing result for WebKit2. All tests that require
+ focus fail on WebKit2. See https://bugs.webkit.org/show_bug.cgi?id=56988.
+ https://bugs.webkit.org/show_bug.cgi?id=12345
+
+ * platform/mac-wk2/fast/css/pseudo-any-expected.txt: Added.
+
+ '''
+
+ self.assertEquals(12345, parse_bug_id_from_changelog(commit_text))
+
+
# 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
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
index 9dd165c..d23a6cc 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
@@ -42,9 +42,11 @@ import urllib2
from webkitpy.common.net.failuremap import FailureMap
from webkitpy.common.net.layouttestresults import LayoutTestResults
from webkitpy.common.net.regressionwindow import RegressionWindow
+from webkitpy.common.net.testoutputset import TestOutputSet
from webkitpy.common.system.logutils import get_logger
-from webkitpy.thirdparty.autoinstalled.mechanize import Browser
+from webkitpy.common.system.zipfileset import ZipFileSet
from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
+from webkitpy.thirdparty.autoinstalled.mechanize import Browser
_log = get_logger(__file__)
@@ -92,6 +94,12 @@ class Builder(object):
self._builds_cache[build_number] = build
return build
+ def latest_cached_build(self):
+ revision_build_pairs = self.revision_build_pairs_with_results()
+ revision_build_pairs.sort(key=lambda i: i[1])
+ latest_build_number = revision_build_pairs[-1][1]
+ return self.build(latest_build_number)
+
def force_build(self, username="webkit-patch", comments=None):
def predicate(form):
try:
@@ -221,6 +229,12 @@ class Build(object):
results_directory = "r%s (%s)" % (self.revision(), self._number)
return "%s/%s" % (self._builder.results_url(), urllib.quote(results_directory))
+ def results_zip_url(self):
+ return "%s.zip" % self.results_url()
+
+ def results(self):
+ return TestOutputSet(self._builder.name(), None, ZipFileSet(self.results_zip_url()), include_expected=False)
+
def _fetch_results_html(self):
results_html = "%s/results.html" % (self.results_url())
# FIXME: This should use NetworkTransaction's 404 handling instead.
@@ -268,8 +282,10 @@ class BuildBot(object):
"SnowLeopard.*Build",
"SnowLeopard.*\(Test",
"SnowLeopard.*\(WebKit2 Test",
- "Leopard.*Release",
+ "Leopard.*",
"Windows.*Build",
+ "Windows.*\(Test",
+ "WinCairo",
"WinCE",
"EFL",
"GTK.*32",
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
index 6addb56..300bc88 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
@@ -231,32 +231,37 @@ class BuildBotTest(unittest.TestCase):
{'name': u'SnowLeopard Intel Release (WebKit2 Tests)', },
{'name': u'SnowLeopard Intel Leaks', },
{'name': u'Windows Release (Build)', },
- {'name': u'Windows Release (Tests)', },
+ {'name': u'Windows 7 Release (Tests)', },
{'name': u'Windows Debug (Build)', },
- {'name': u'Windows Debug (Tests)', },
+ {'name': u'Windows XP Debug (Tests)', },
+ {'name': u'Windows 7 Release (WebKit2 Tests)', },
{'name': u'GTK Linux 32-bit Release', },
{'name': u'GTK Linux 32-bit Debug', },
{'name': u'GTK Linux 64-bit Debug', },
- {'name': u'GTK Linux 64-bit Release', },
{'name': u'Qt Linux Release', },
{'name': u'Qt Linux Release minimal', },
{'name': u'Qt Linux ARMv7 Release', },
{'name': u'Qt Windows 32-bit Release', },
{'name': u'Qt Windows 32-bit Debug', },
- {'name': u'Chromium Linux Release', },
- {'name': u'Chromium Mac Release', },
{'name': u'Chromium Win Release', },
- {'name': u'Chromium Linux Release (Tests)', },
- {'name': u'Chromium Mac Release (Tests)', },
+ {'name': u'Chromium Mac Release', },
+ {'name': u'Chromium Linux Release', },
{'name': u'Chromium Win Release (Tests)', },
+ {'name': u'Chromium Mac Release (Tests)', },
+ {'name': u'Chromium Linux Release (Tests)', },
{'name': u'New run-webkit-tests', },
+ {'name': u'WinCairo Debug (Build)', },
+ {'name': u'WinCE Release (Build)', },
+ {'name': u'EFL Linux Release (Build)', },
]
name_regexps = [
"SnowLeopard.*Build",
"SnowLeopard.*\(Test",
"SnowLeopard.*\(WebKit2 Test",
- "Leopard.*Release",
+ "Leopard.*",
"Windows.*Build",
+ "Windows.*\(Test",
+ "WinCairo",
"WinCE",
"EFL",
"GTK.*32",
@@ -267,11 +272,15 @@ class BuildBotTest(unittest.TestCase):
expected_builders = [
{'name': u'Leopard Intel Release (Build)', },
{'name': u'Leopard Intel Release (Tests)', },
+ {'name': u'Leopard Intel Debug (Build)', },
+ {'name': u'Leopard Intel Debug (Tests)', },
{'name': u'SnowLeopard Intel Release (Build)', },
{'name': u'SnowLeopard Intel Release (Tests)', },
{'name': u'SnowLeopard Intel Release (WebKit2 Tests)', },
{'name': u'Windows Release (Build)', },
+ {'name': u'Windows 7 Release (Tests)', },
{'name': u'Windows Debug (Build)', },
+ {'name': u'Windows XP Debug (Tests)', },
{'name': u'GTK Linux 32-bit Release', },
{'name': u'GTK Linux 32-bit Debug', },
{'name': u'GTK Linux 64-bit Debug', },
@@ -280,9 +289,12 @@ class BuildBotTest(unittest.TestCase):
{'name': u'Qt Linux ARMv7 Release', },
{'name': u'Qt Windows 32-bit Release', },
{'name': u'Qt Windows 32-bit Debug', },
- {'name': u'Chromium Linux Release', },
- {'name': u'Chromium Mac Release', },
{'name': u'Chromium Win Release', },
+ {'name': u'Chromium Mac Release', },
+ {'name': u'Chromium Linux Release', },
+ {'name': u'WinCairo Debug (Build)', },
+ {'name': u'WinCE Release (Build)', },
+ {'name': u'EFL Linux Release (Build)', },
]
# This test should probably be updated if the default regexp list changes
@@ -410,6 +422,33 @@ class BuildBotTest(unittest.TestCase):
buildbot._latest_builds_from_builders = mock_builds_from_builders
self.assertEqual(buildbot.last_green_revision(), 1)
+ def _fetch_build(self, build_number):
+ if build_number == 5:
+ return "correct build"
+ return "wrong build"
+
+ def _fetch_revision_to_build_map(self):
+ return {'r5': 5, 'r2': 2, 'r3': 3}
+
+ def test_latest_cached_build(self):
+ b = Builder('builder', BuildBot())
+ b._fetch_build = self._fetch_build
+ b._fetch_revision_to_build_map = self._fetch_revision_to_build_map
+ self.assertEquals("correct build", b.latest_cached_build())
+
+ def results_url(self):
+ return "some-url"
+
+ def test_results_zip_url(self):
+ b = Build(None, 123, 123, False)
+ b.results_url = self.results_url
+ self.assertEquals("some-url.zip", b.results_zip_url())
+
+ def test_results(self):
+ builder = Builder('builder', BuildBot())
+ b = Build(builder, 123, 123, True)
+ self.assertTrue(b.results())
+
if __name__ == '__main__':
unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/system/autoinstall.py b/Tools/Scripts/webkitpy/common/system/autoinstall.py
index 9adab29..4ffcccc 100755
--- a/Tools/Scripts/webkitpy/common/system/autoinstall.py
+++ b/Tools/Scripts/webkitpy/common/system/autoinstall.py
@@ -61,7 +61,7 @@ class AutoInstaller(object):
installer.install(url="http://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b",
url_subpath="pep8-0.5.0/pep8.py")
- installer.install(url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip",
+ installer.install(url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip",
url_subpath="mechanize")
"""
@@ -512,6 +512,6 @@ if __name__=="__main__":
url_subpath="pep8-0.5.0/pep8.py")
installer.install(should_refresh=False,
target_name="mechanize",
- url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip",
+ url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip",
url_subpath="mechanize")
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem.py b/Tools/Scripts/webkitpy/common/system/filesystem.py
index b876807..1988546 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem.py
@@ -195,6 +195,9 @@ class FileSystem(object):
mode = 'a'
return codecs.open(path, mode, 'utf8')
+ def open_binary_file_for_reading(self, path):
+ return codecs.open(path, 'rb')
+
def read_binary_file(self, path):
"""Return the contents of the file at the given path as a byte string."""
with file(path, 'rb') as f:
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
index aa79a8c..a6d158a 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
@@ -228,6 +228,11 @@ class MockFileSystem(object):
def read_text_file(self, path):
return self.read_binary_file(path).decode('utf-8')
+ def open_binary_file_for_reading(self, path):
+ if self.files[path] is None:
+ self._raise_not_found(path)
+ return ReadableFileObject(self, path, self.files[path])
+
def read_binary_file(self, path):
# Intentionally raises KeyError if we don't recognize the path.
if self.files[path] is None:
@@ -285,3 +290,28 @@ class WritableFileObject(object):
def write(self, str):
self.fs.files[self.path] += str
self.fs.written_files[self.path] = self.fs.files[self.path]
+
+
+class ReadableFileObject(object):
+ def __init__(self, fs, path, data=""):
+ self.fs = fs
+ self.path = path
+ self.closed = False
+ self.data = data
+ self.offset = 0
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, type, value, traceback):
+ self.close()
+
+ def close(self):
+ self.closed = True
+
+ def read(self, bytes=None):
+ if not bytes:
+ return self.data[self.offset:]
+ start = self.offset
+ self.offset += bytes
+ return self.data[start:self.offset]
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
index 83b2215..6d5cda8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
@@ -211,7 +211,7 @@ class TestShellThread(threading.Thread, worker_mixin.WorkerMixin):
self._num_tests_in_current_group = len(self._filename_list)
self._current_group_start_time = time.time()
- test_input = self._filename_list.pop()
+ test_input = self._filename_list.pop(0)
# We have a url, run tests.
self._num_tests += 1
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py
index d755f67..a8c716f 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/single_test_runner.py
@@ -44,14 +44,6 @@ def run_single_test(port, options, test_input, driver, worker_name):
return runner.run()
-class ExpectedDriverOutput:
- """Groups information about an expected driver output."""
- def __init__(self, text, image, image_hash):
- self.text = text
- self.image = image
- self.image_hash = image_hash
-
-
class SingleTestRunner:
def __init__(self, options, port, driver, test_input, worker_name):
@@ -63,10 +55,43 @@ class SingleTestRunner:
self._worker_name = worker_name
self._testname = port.relative_test_filename(test_input.filename)
+ self._is_reftest = False
+ self._is_mismatch_reftest = False
+ self._reference_filename = None
+
+ fs = port._filesystem
+ reftest_expected_filename = port.reftest_expected_filename(self._filename)
+ if fs.exists(reftest_expected_filename):
+ self._is_reftest = True
+ self._reference_filename = reftest_expected_filename
+
+ reftest_expected_mismatch_filename = port.reftest_expected_mismatch_filename(self._filename)
+ if fs.exists(reftest_expected_mismatch_filename):
+ if self._is_reftest:
+ _log.error('It is not allowed that one test file has both'
+ ' expected.html file and expected-mismatch.html file'
+ ' at the same time. Please remove either %s or %s.',
+ reftest_expected_filename, reftest_expected_mismatch_filename)
+ else:
+ self._is_reftest = True
+ self._is_mismatch_reftest = True
+ self._reference_filename = reftest_expected_mismatch_filename
+
+ if self._is_reftest:
+ # Detect and report a test which has a wrong combination of expectation files.
+ # For example, if 'foo.html' has two expectation files, 'foo-expected.html' and
+ # 'foo-expected.txt', we should warn users. One test file must be used exclusively
+ # in either layout tests or reftests, but not in both.
+ for suffix in ['.txt', '.checksum', '.png']:
+ expected_filename = self._port.expected_filename(self._filename, suffix)
+ if fs.exists(expected_filename):
+ _log.error('The reftest (%s) can not have an expectation file (%s).'
+ ' Please remove that file.', self._testname, expected_filename)
+
def _expected_driver_output(self):
- return ExpectedDriverOutput(self._port.expected_text(self._filename),
- self._port.expected_image(self._filename),
- self._port.expected_checksum(self._filename))
+ return base.DriverOutput(self._port.expected_text(self._filename),
+ self._port.expected_image(self._filename),
+ self._port.expected_checksum(self._filename))
def _should_fetch_expected_checksum(self):
return (self._options.pixel_tests and
@@ -84,7 +109,13 @@ class SingleTestRunner:
def run(self):
if self._options.new_baseline or self._options.reset_results:
- return self._run_rebaseline()
+ if self._is_reftest:
+ # Returns a dummy TestResult. We don't have to rebase for reftests.
+ return TestResult(self._filename)
+ else:
+ return self._run_rebaseline()
+ if self._is_reftest:
+ return self._run_reftest()
return self._run_compare_test()
def _run_compare_test(self):
@@ -98,6 +129,8 @@ class SingleTestRunner:
def _run_rebaseline(self):
driver_output = self._driver.run_test(self._driver_input())
failures = self._handle_error(driver_output)
+ test_result_writer.write_test_result(self._port, self._options.results_directory, self._filename,
+ driver_output, None, failures)
# FIXME: It the test crashed or timed out, it might be bettter to avoid
# to write new baselines.
self._save_baselines(driver_output)
@@ -145,22 +178,31 @@ class SingleTestRunner:
port.update_baseline(output_path, data)
- def _handle_error(self, driver_output):
+ def _handle_error(self, driver_output, reference_filename=None):
+ """Returns test failures if some unusual errors happen in driver's run.
+
+ Args:
+ driver_output: The output from the driver.
+ reference_filename: The full path to the reference file which produced the driver_output.
+ This arg is optional and should be used only in reftests until we have a better way to know
+ which html file is used for producing the driver_output.
+ """
failures = []
fs = self._port._filesystem
if driver_output.timeout:
- failures.append(test_failures.FailureTimeout())
+ failures.append(test_failures.FailureTimeout(reference_filename))
+
+ if reference_filename:
+ testname = self._port.relative_test_filename(reference_filename)
+ else:
+ testname = self._testname
+
if driver_output.crash:
- failures.append(test_failures.FailureCrash())
- _log.debug("%s Stacktrace for %s:\n%s" % (self._worker_name, self._testname,
+ failures.append(test_failures.FailureCrash(reference_filename))
+ _log.debug("%s Stacktrace for %s:\n%s" % (self._worker_name, testname,
driver_output.error))
- # FIXME: Use test_result_writer module.
- stack_filename = fs.join(self._options.results_directory, self._testname)
- stack_filename = fs.splitext(stack_filename)[0] + "-stack.txt"
- fs.maybe_make_directory(fs.dirname(stack_filename))
- fs.write_text_file(stack_filename, driver_output.error)
elif driver_output.error:
- _log.debug("%s %s output stderr lines:\n%s" % (self._worker_name, self._testname,
+ _log.debug("%s %s output stderr lines:\n%s" % (self._worker_name, testname,
driver_output.error))
return failures
@@ -210,3 +252,31 @@ class SingleTestRunner:
elif driver_output.image_hash != expected_driver_outputs.image_hash:
failures.append(test_failures.FailureImageHashMismatch())
return failures
+
+ def _run_reftest(self):
+ driver_output1 = self._driver.run_test(self._driver_input())
+ driver_output2 = self._driver.run_test(
+ base.DriverInput(self._reference_filename, self._timeout, driver_output1.image_hash))
+ test_result = self._compare_output_with_reference(driver_output1, driver_output2)
+
+ test_result_writer.write_test_result(self._port, self._options.results_directory, self._filename,
+ driver_output1, driver_output2, test_result.failures)
+ return test_result
+
+ def _compare_output_with_reference(self, driver_output1, driver_output2):
+ total_test_time = driver_output1.test_time + driver_output2.test_time
+ failures = []
+ failures.extend(self._handle_error(driver_output1))
+ if failures:
+ # Don't continue any more if we already have crash or timeout.
+ return TestResult(self._filename, failures, total_test_time)
+ failures.extend(self._handle_error(driver_output2, reference_filename=self._reference_filename))
+ if failures:
+ return TestResult(self._filename, failures, total_test_time)
+
+ if self._is_mismatch_reftest:
+ if driver_output1.image_hash == driver_output2.image_hash:
+ failures.append(test_failures.FailureReftestMismatchDidNotOccur())
+ elif driver_output1.image_hash != driver_output2.image_hash:
+ failures.append(test_failures.FailureReftestMismatch())
+ return TestResult(self._filename, failures, total_test_time)
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
index eb59d36..1fad772 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py
@@ -60,11 +60,13 @@ def determine_result_type(failure_list):
is_text_failure = FailureTextMismatch in failure_types
is_image_failure = (FailureImageHashIncorrect in failure_types or
FailureImageHashMismatch in failure_types)
+ is_reftest_failure = (FailureReftestMismatch in failure_types or
+ FailureReftestMismatchDidNotOccur in failure_types)
if is_text_failure and is_image_failure:
return test_expectations.IMAGE_PLUS_TEXT
elif is_text_failure:
return test_expectations.TEXT
- elif is_image_failure:
+ elif is_image_failure or is_reftest_failure:
return test_expectations.IMAGE
else:
raise ValueError("unclassifiable set of failures: "
@@ -126,8 +128,8 @@ class TestFailure(object):
return filename[:filename.rfind('.')] + modifier
-class FailureWithType(TestFailure):
- """Base class that produces standard HTML output based on the test type.
+class ComparisonTestFailure(TestFailure):
+ """Base class that produces standard HTML output based on the result of the comparison test.
Subclasses may commonly choose to override the ResultHtmlOutput, but still
use the standard OutputLinks.
@@ -177,11 +179,17 @@ class FailureTimeout(TestFailure):
"""Test timed out. We also want to restart DumpRenderTree if this
happens."""
+ def __init__(self, reference_filename=None):
+ self.reference_filename = reference_filename
+
@staticmethod
def message():
return "Test timed out"
def result_html_output(self, filename):
+ if self.reference_filename:
+ return "<strong>%s</strong> (occured in <a href=%s>expected html</a>)" % (
+ self.message(), self.reference_filename)
return "<strong>%s</strong>" % self.message()
def should_kill_dump_render_tree(self):
@@ -191,6 +199,9 @@ class FailureTimeout(TestFailure):
class FailureCrash(TestFailure):
"""DumpRenderTree crashed."""
+ def __init__(self, reference_filename=None):
+ self.reference_filename = reference_filename
+
@staticmethod
def message():
return "DumpRenderTree crashed"
@@ -198,14 +209,17 @@ class FailureCrash(TestFailure):
def result_html_output(self, filename):
# FIXME: create a link to the minidump file
stack = self.relative_output_filename(filename, "-stack.txt")
- return "<strong>%s</strong> <a href=%s>stack</a>" % (self.message(),
- stack)
+ if self.reference_filename:
+ return "<strong>%s</strong> <a href=%s>stack</a> (occured in <a href=%s>expected html</a>)" % (
+ self.message(), stack, self.reference_filename)
+ else:
+ return "<strong>%s</strong> <a href=%s>stack</a>" % (self.message(), stack)
def should_kill_dump_render_tree(self):
return True
-class FailureMissingResult(FailureWithType):
+class FailureMissingResult(ComparisonTestFailure):
"""Expected result was missing."""
OUT_FILENAMES = ("-actual.txt",)
@@ -218,7 +232,7 @@ class FailureMissingResult(FailureWithType):
self.output_links(filename, self.OUT_FILENAMES))
-class FailureTextMismatch(FailureWithType):
+class FailureTextMismatch(ComparisonTestFailure):
"""Text diff output failed."""
# Filename suffixes used by ResultHtmlOutput.
# FIXME: Why don't we use the constants from TestTypeBase here?
@@ -230,7 +244,7 @@ class FailureTextMismatch(FailureWithType):
return "Text diff mismatch"
-class FailureMissingImageHash(FailureWithType):
+class FailureMissingImageHash(ComparisonTestFailure):
"""Actual result hash was missing."""
# Chrome doesn't know to display a .checksum file as text, so don't bother
# putting in a link to the actual result.
@@ -243,7 +257,7 @@ class FailureMissingImageHash(FailureWithType):
return "<strong>%s</strong>" % self.message()
-class FailureMissingImage(FailureWithType):
+class FailureMissingImage(ComparisonTestFailure):
"""Actual result image was missing."""
OUT_FILENAMES = ("-actual.png",)
@@ -256,7 +270,7 @@ class FailureMissingImage(FailureWithType):
self.output_links(filename, self.OUT_FILENAMES))
-class FailureImageHashMismatch(FailureWithType):
+class FailureImageHashMismatch(ComparisonTestFailure):
"""Image hashes didn't match."""
OUT_FILENAMES = ("-actual.png", "-expected.png", "-diff.png")
@@ -267,7 +281,7 @@ class FailureImageHashMismatch(FailureWithType):
return "Image mismatch"
-class FailureImageHashIncorrect(FailureWithType):
+class FailureImageHashIncorrect(ComparisonTestFailure):
"""Actual result hash is incorrect."""
# Chrome doesn't know to display a .checksum file as text, so don't bother
# putting in a link to the actual result.
@@ -279,9 +293,48 @@ class FailureImageHashIncorrect(FailureWithType):
def result_html_output(self, filename):
return "<strong>%s</strong>" % self.message()
+
+class FailureReftestMismatch(ComparisonTestFailure):
+ """The result didn't match the reference rendering."""
+
+ OUT_FILENAMES = ("-expected.html", "-expected.png", "-actual.png",
+ "-diff.png",)
+
+ @staticmethod
+ def message():
+ return "Mismatch with reference"
+
+ def output_links(self, filename, out_names):
+ links = ['']
+ uris = [self.relative_output_filename(filename, output_filename)
+ for output_filename in out_names]
+ for text, uri in zip(['-expected.html', 'expected', 'actual', 'diff'], uris):
+ links.append("<a href='%s'>%s</a>" % (uri, text))
+ return ' '.join(links)
+
+
+class FailureReftestMismatchDidNotOccur(ComparisonTestFailure):
+ """Unexpected match between the result and the reference rendering."""
+
+ OUT_FILENAMES = ("-expected-mismatch.html", "-actual.png",)
+
+ @staticmethod
+ def message():
+ return "Mismatch with the reference did not occur"
+
+ def output_links(self, filename, out_names):
+ links = ['']
+ uris = [self.relative_output_filename(filename, output_filename)
+ for output_filename in out_names]
+ for text, uri in zip(['-expected-mismatch.html', 'image'], uris):
+ links.append("<a href='%s'>%s</a>" % (uri, text))
+ return ' '.join(links)
+
+
# Convenient collection of all failure classes for anything that might
# need to enumerate over them all.
ALL_FAILURE_CLASSES = (FailureTimeout, FailureCrash, FailureMissingResult,
FailureTextMismatch, FailureMissingImageHash,
FailureMissingImage, FailureImageHashMismatch,
- FailureImageHashIncorrect)
+ FailureImageHashIncorrect, FailureReftestMismatch,
+ FailureReftestMismatchDidNotOccur)
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py
index 882da91..e209503 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py
@@ -64,7 +64,17 @@ def write_test_result(port, root_output_dir, filename, driver_output,
checksums_mismatch_but_images_are_same = True
imagehash_mismatch_failure = failure
elif isinstance(failure, test_failures.FailureCrash):
- writer.write_crash_report(driver_output.error)
+ if failure.reference_filename:
+ writer.write_crash_report(expected_driver_output.error)
+ else:
+ writer.write_crash_report(driver_output.error)
+ elif isinstance(failure, test_failures.FailureReftestMismatch):
+ writer.write_image_files(driver_output.image, expected_driver_output.image)
+ writer.create_image_diff_and_write_result(driver_output.image, expected_driver_output.image)
+ writer.copy_file(port.reftest_expected_filename(filename), '-expected.html')
+ elif isinstance(failure, test_failures.FailureReftestMismatchDidNotOccur):
+ writer.write_image_files(driver_output.image, expected_image=None)
+ writer.copy_file(port.reftest_expected_mismatch_filename(filename), '-expected-mismatch.html')
else:
assert isinstance(failure, (test_failures.FailureTimeout,))
@@ -135,9 +145,9 @@ class TestResultWriter(object):
expected_filename = self.output_filename(self.FILENAME_SUFFIX_EXPECTED + file_type)
fs = self._port._filesystem
- if output:
+ if output is not None:
fs.write_binary_file(actual_filename, output)
- if expected:
+ if expected is not None:
fs.write_binary_file(expected_filename, expected)
def write_crash_report(self, error):
@@ -193,3 +203,10 @@ class TestResultWriter(object):
# To do so, we have to change port.diff_image() as well.
diff_filename = self.output_filename(self.FILENAME_SUFFIX_IMAGE_DIFF)
return self._port.diff_image(actual_image, expected_image, diff_filename)
+
+ def copy_file(self, src_filepath, dst_extension):
+ fs = self._port._filesystem
+ assert fs.exists(src_filepath), 'src_filepath: %s' % src_filepath
+ dst_filename = self.output_filename(dst_extension)
+ self._make_output_directory()
+ fs.copyfile(src_filepath, dst_filename)
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
index 0859f68..569dd51 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
@@ -495,10 +495,6 @@ class TestRunner:
# a PriorityQueue until we move to Python 2.6.
for directory in tests_by_dir:
test_list = tests_by_dir[directory]
- # Keep the tests in alphabetical order.
- # FIXME: Remove once tests are fixed so they can be run in any
- # order.
- test_list.reverse()
test_list_tuple = (directory, test_list)
test_lists.append(test_list_tuple)
test_lists.sort(lambda a, b: cmp(len(b[1]), len(a[1])))
@@ -507,7 +503,6 @@ class TestRunner:
# but each http test takes a very long time to run, so sorting by the
# number of tests doesn't accurately capture how long they take to run.
if tests_to_http_lock:
- tests_to_http_lock.reverse()
test_lists.insert(0, ("tests_to_http_lock", tests_to_http_lock))
return test_lists
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py
index 0522d39..5a6344c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py
@@ -224,7 +224,7 @@ class TestRunner2(test_runner.TestRunner):
if worker_state.wedged:
# This shouldn't happen if we have our timeouts tuned properly.
- _log.error("%s unwedged", w.name)
+ _log.error("%s unwedged", source)
self._all_results.append(result)
self._update_summary_with_result(self._current_result_summary, result)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/layout_tests/port/base.py
index 247a260..dea126f 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/base.py
@@ -30,6 +30,8 @@
"""Abstract base class of Port-specific entrypoints for the layout tests
test infrastructure (the Port and Driver classes)."""
+from __future__ import with_statement
+
import cgi
import difflib
import errno
@@ -44,20 +46,19 @@ try:
except ImportError:
multiprocessing = None
-import apache_http_server
-import config as port_config
-import http_lock
-import http_server
-import test_files
-import websocket_server
-
from webkitpy.common import system
from webkitpy.common.system import filesystem
from webkitpy.common.system import logutils
from webkitpy.common.system import path
from webkitpy.common.system.executive import Executive, ScriptError
from webkitpy.common.system.user import User
-
+from webkitpy.layout_tests import read_checksum_from_png
+from webkitpy.layout_tests.port import apache_http_server
+from webkitpy.layout_tests.port import config as port_config
+from webkitpy.layout_tests.port import http_lock
+from webkitpy.layout_tests.port import http_server
+from webkitpy.layout_tests.port import test_files
+from webkitpy.layout_tests.port import websocket_server
_log = logutils.get_logger(__file__)
@@ -139,7 +140,9 @@ class Port(object):
return self._executive.cpu_count()
def default_worker_model(self):
- return 'old-threads'
+ if self._multiprocessing_is_available:
+ return 'processes'
+ return 'threads'
def baseline_path(self):
"""Return the absolute path to the directory to store new baselines
@@ -323,10 +326,17 @@ class Port(object):
def expected_checksum(self, test):
"""Returns the checksum of the image we expect the test to produce, or None if it is a text-only test."""
- path = self.expected_filename(test, '.checksum')
- if not self.path_exists(path):
- return None
- return self._filesystem.read_binary_file(path)
+ png_path = self.expected_filename(test, '.png')
+ checksum_path = self._filesystem.splitext(png_path)[0] + '.checksum'
+
+ if self.path_exists(checksum_path):
+ return self._filesystem.read_binary_file(checksum_path)
+
+ if self.path_exists(png_path):
+ with self._filesystem.open_binary_file_for_reading(png_path) as filehandle:
+ return read_checksum_from_png.read_checksum(filehandle)
+
+ return None
def expected_image(self, test):
"""Returns the image we expect the test to produce."""
@@ -347,6 +357,14 @@ class Port(object):
text = self._filesystem.read_binary_file(path)
return text.replace("\r\n", "\n")
+ def reftest_expected_filename(self, filename):
+ """Return the filename of reference we expect the test matches."""
+ return self.expected_filename(filename, '.html')
+
+ def reftest_expected_mismatch_filename(self, filename):
+ """Return the filename of reference we don't expect the test matches."""
+ return self.expected_filename(filename, '-mismatch.html')
+
def filename_to_uri(self, filename):
"""Convert a test file (which is an absolute path) to a URI."""
LAYOUTTEST_HTTP_DIR = "http/tests/"
@@ -498,6 +516,9 @@ class Port(object):
def script_path(self, script_name):
return self._config.script_path(script_name)
+ def script_shell_command(self, script_name):
+ return self._config.script_shell_command(script_name)
+
def path_to_test_expectations_file(self):
"""Update the test expectations to the passed-in string.
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
index a8e1bb2..2cd2435 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
@@ -114,11 +114,6 @@ class ChromiumLinuxPort(chromium.ChromiumPort):
'LinuxBuildInstructions')
return result
- def default_worker_model(self):
- if self._multiprocessing_is_available:
- return 'processes'
- return 'old-threads'
-
def test_platform_name(self):
# We use 'linux' instead of 'chromium-linux' in test_expectations.txt.
return 'linux'
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
index 78a6682..141b587 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
@@ -46,11 +46,25 @@ class ChromiumMacPort(chromium.ChromiumPort):
SUPPORTED_OS_VERSIONS = ('leopard', 'snowleopard')
FALLBACK_PATHS = {
- 'leopard': ['chromium-mac-leopard', 'chromium-mac-snowleopard', 'chromium-mac', 'chromium',
- 'mac-leopard', 'mac-snowleopard', 'mac'],
- 'snowleopard': ['chromium-mac-snowleopard', 'chromium-mac', 'chromium',
- 'mac-snowleopard', 'mac'],
- '': ['chromium-mac', 'chromium', 'mac'],
+ 'leopard': [
+ 'chromium-mac-leopard',
+ 'chromium-mac',
+ 'chromium',
+ 'mac-leopard',
+ 'mac-snowleopard',
+ 'mac',
+ ],
+ 'snowleopard': [
+ 'chromium-mac',
+ 'chromium',
+ 'mac-snowleopard',
+ 'mac',
+ ],
+ '': [
+ 'chromium-mac',
+ 'chromium',
+ 'mac',
+ ],
}
def __init__(self, port_name=None, os_version_string=None, rebaselining=False, **kwargs):
@@ -100,22 +114,12 @@ class ChromiumMacPort(chromium.ChromiumPort):
return result
def default_child_processes(self):
- if self.get_option('worker_model') == 'old-threads':
- # FIXME: we need to run single-threaded for now. See
- # https://bugs.webkit.org/show_bug.cgi?id=38553. Unfortunately this
- # routine is called right before the logger is configured, so if we
- # try to _log.warning(), it gets thrown away.
- import sys
- sys.stderr.write("Defaulting to one child - see https://bugs.webkit.org/show_bug.cgi?id=38553\n")
+ if not self._multiprocessing_is_available:
+ # Running multiple threads in Mac Python is unstable (See
+ # https://bugs.webkit.org/show_bug.cgi?id=38553 for more info).
return 1
-
return chromium.ChromiumPort.default_child_processes(self)
- def default_worker_model(self):
- if self._multiprocessing_is_available:
- return 'processes'
- return 'old-threads'
-
def driver_name(self):
return "DumpRenderTree"
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
index e7c6e49..d0908df 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
@@ -129,6 +129,10 @@ class ChromiumWinPort(chromium.ChromiumPort):
'build-instructions-windows')
return result
+ def default_worker_model(self):
+ # FIXME: should use base class method instead. See bug 55163.
+ return 'old-threads'
+
def relative_test_filename(self, filename):
path = filename[len(self.layout_tests_dir()) + 1:]
return path.replace('\\', '/')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py b/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py
index 6b3bd51..20aa776 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/dryrun.py
@@ -118,12 +118,26 @@ class DryrunDriver(base.Driver):
def run_test(self, driver_input):
start_time = time.time()
- text_output = self._port.expected_text(driver_input.filename)
-
- if driver_input.image_hash is not None:
+ fs = self._port._filesystem
+ if fs.exists(self._port.reftest_expected_filename(driver_input.filename)) or \
+ fs.exists(self._port.reftest_expected_mismatch_filename(driver_input.filename)):
+ text_output = 'test-text'
+ image = 'test-image'
+ hash = 'test-checksum'
+ elif driver_input.filename.endswith('-expected.html'):
+ text_output = 'test-text'
+ image = 'test-image'
+ hash = 'test-checksum'
+ elif driver_input.filename.endswith('-expected-mismatch.html'):
+ text_output = 'test-text-mismatch'
+ image = 'test-image-mismatch'
+ hash = 'test-checksum-mismatch'
+ elif driver_input.image_hash is not None:
+ text_output = self._port.expected_text(driver_input.filename)
image = self._port.expected_image(driver_input.filename)
hash = self._port.expected_checksum(driver_input.filename)
else:
+ text_output = self._port.expected_text(driver_input.filename)
image = None
hash = None
return base.DriverOutput(text_output, image, hash, False,
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/http_server.py b/Tools/Scripts/webkitpy/layout_tests/port/http_server.py
index 752b099..1753aee 100755
--- a/Tools/Scripts/webkitpy/layout_tests/port/http_server.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/http_server.py
@@ -55,7 +55,7 @@ class HttpdNotStarted(Exception):
class Lighttpd(http_server_base.HttpServerBase):
def __init__(self, port_obj, output_dir, background=False, port=None,
- root=None, run_background=None):
+ root=None, run_background=None, layout_tests_dir=None):
"""Args:
output_dir: the absolute path to the layout test result directory
"""
@@ -66,16 +66,21 @@ class Lighttpd(http_server_base.HttpServerBase):
self._port = port
self._root = root
self._run_background = run_background
+ self._layout_tests_dir = layout_tests_dir
+
if self._port:
self._port = int(self._port)
+ if not self._layout_tests_dir:
+ self._layout_tests_dir = self._port_obj.layout_tests_dir()
+
try:
self._webkit_tests = os.path.join(
- self._port_obj.layout_tests_dir(), 'http', 'tests')
+ self._layout_tests_dir, 'http', 'tests')
self._js_test_resource = os.path.join(
- self._port_obj.layout_tests_dir(), 'fast', 'js', 'resources')
+ self._layout_tests_dir, 'fast', 'js', 'resources')
self._media_resource = os.path.join(
- self._port_obj.layout_tests_dir(), 'media')
+ self._layout_tests_dir, 'media')
except:
self._webkit_tests = None
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mac.py b/Tools/Scripts/webkitpy/layout_tests/port/mac.py
index 0168ec7..4315543 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mac.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/mac.py
@@ -88,14 +88,14 @@ class MacPort(WebKitPort):
# four threads in parallel.
# See https://bugs.webkit.org/show_bug.cgi?id=36622
child_processes = WebKitPort.default_child_processes(self)
- if self.get_option('worker_model') == 'old-threads' and child_processes > 4:
+ if not self._multiprocessing_is_available and child_processes > 4:
return 4
return child_processes
def default_worker_model(self):
if self._multiprocessing_is_available:
return 'processes'
- return 'old-threads'
+ return 'threads'
def baseline_search_path(self):
return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self._version])
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
index 71de14b..b6f6e8a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
@@ -207,6 +207,9 @@ class MockDRTTest(unittest.TestCase):
def test_textonly(self):
self.assertTest('passes/image.html', False)
+ def test_checksum_in_png(self):
+ self.assertTest('passes/checksum_in_image.html', True)
+
class MockChromiumDRTTest(MockDRTTest):
def extra_args(self, pixel_tests):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py b/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
index d37fdc0..649e33c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
@@ -73,7 +73,7 @@ class PortTestCase(unittest.TestCase):
if multiprocessing:
self.assertEqual(port.default_worker_model(), 'processes')
else:
- self.assertEqual(port.default_worker_model(), 'old-threads')
+ self.assertEqual(port.default_worker_model(), 'threads')
def test_driver_cmd_line(self):
port = self.make_port()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test.py b/Tools/Scripts/webkitpy/layout_tests/port/test.py
index d323ed5..392818d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/test.py
@@ -50,6 +50,7 @@ class TestInstance:
self.keyboard = False
self.error = ''
self.timeout = False
+ self.is_reftest = False
# The values of each field are treated as raw byte strings. They
# will be converted to unicode strings where appropriate using
@@ -78,6 +79,13 @@ class TestList:
test.__dict__[key] = value
self.tests[name] = test
+ def add_reftest(self, name, reference_name, same_image):
+ self.add(name, actual_checksum='xxx', actual_image='XXX', is_reftest=True)
+ if same_image:
+ self.add(reference_name, actual_checksum='xxx', actual_image='XXX', is_reftest=True)
+ else:
+ self.add(reference_name, actual_checksum='yyy', actual_image='YYY', is_reftest=True)
+
def keys(self):
return self.tests.keys()
@@ -104,7 +112,9 @@ def unit_test_list():
actual_checksum='image_checksum_fail-checksum',
actual_image='image_checksum_fail-png')
tests.add('failures/expected/keyboard.html', keyboard=True)
- tests.add('failures/expected/missing_check.html', expected_checksum=None)
+ tests.add('failures/expected/missing_check.html',
+ expected_checksum=None,
+ expected_image=None)
tests.add('failures/expected/missing_image.html', expected_image=None)
tests.add('failures/expected/missing_text.html', expected_text=None)
tests.add('failures/expected/newlines_leading.html',
@@ -120,15 +130,29 @@ def unit_test_list():
actual_checksum='text-image-checksum_fail-checksum')
tests.add('failures/unexpected/timeout.html', timeout=True)
tests.add('http/tests/passes/text.html')
+ tests.add('http/tests/passes/image.html')
tests.add('http/tests/ssl/text.html')
tests.add('passes/error.html', error='stuff going to stderr')
tests.add('passes/image.html')
tests.add('passes/platform_image.html')
+ tests.add('passes/checksum_in_image.html',
+ expected_checksum=None,
+ expected_image='tEXtchecksum\x00checksum_in_image-checksum')
# Text output files contain "\r\n" on Windows. This may be
# helpfully filtered to "\r\r\n" by our Python/Cygwin tooling.
tests.add('passes/text.html',
expected_text='\nfoo\n\n', actual_text='\nfoo\r\n\r\r\n')
+
+ # For reftests.
+ tests.add_reftest('passes/reftest.html', 'passes/reftest-expected.html', same_image=True)
+ tests.add_reftest('passes/mismatch.html', 'passes/mismatch-expected-mismatch.html', same_image=False)
+ tests.add_reftest('failures/expected/reftest.html', 'failures/expected/reftest-expected.html', same_image=False)
+ tests.add_reftest('failures/expected/mismatch.html', 'failures/expected/mismatch-expected-mismatch.html', same_image=True)
+ tests.add_reftest('failures/unexpected/reftest.html', 'failures/unexpected/reftest-expected.html', same_image=False)
+ tests.add_reftest('failures/unexpected/mismatch.html', 'failures/unexpected/mismatch-expected-mismatch.html', same_image=True)
+ # FIXME: Add a reftest which crashes.
+
tests.add('websocket/tests/passes/text.html')
return tests
@@ -158,6 +182,8 @@ def unit_test_filesystem(files=None):
# Add each test and the expected output, if any.
for test in test_list.tests.values():
add_file(files, test, '.html', '')
+ if test.is_reftest:
+ continue
add_file(files, test, '-expected.txt', test.expected_text)
add_file(files, test, '-expected.checksum', test.expected_checksum)
add_file(files, test, '-expected.png', test.expected_image)
@@ -169,12 +195,14 @@ WONTFIX : failures/expected/crash.html = CRASH
// This one actually passes because the checksums will match.
WONTFIX : failures/expected/image.html = PASS
WONTFIX : failures/expected/image_checksum.html = IMAGE
+WONTFIX : failures/expected/mismatch.html = IMAGE
WONTFIX : failures/expected/missing_check.html = MISSING PASS
WONTFIX : failures/expected/missing_image.html = MISSING PASS
WONTFIX : failures/expected/missing_text.html = MISSING PASS
WONTFIX : failures/expected/newlines_leading.html = TEXT
WONTFIX : failures/expected/newlines_trailing.html = TEXT
WONTFIX : failures/expected/newlines_with_excess_CR.html = TEXT
+WONTFIX : failures/expected/reftest.html = IMAGE
WONTFIX : failures/expected/text.html = TEXT
WONTFIX : failures/expected/timeout.html = TIMEOUT
WONTFIX SKIP : failures/expected/hang.html = TIMEOUT
@@ -222,6 +250,12 @@ class TestPort(base.Port):
def baseline_search_path(self):
return [self.baseline_path()]
+ def default_child_processes(self):
+ return 1
+
+ def default_worker_model(self):
+ return 'inline'
+
def check_build(self, needs_http):
return True
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test_files.py b/Tools/Scripts/webkitpy/layout_tests/port/test_files.py
index 534462a..fbbbea5 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test_files.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/test_files.py
@@ -105,11 +105,10 @@ def _has_supported_extension(filesystem, filename):
return extension in _supported_file_extensions
-def _is_reference_html_file(filename):
+def is_reference_html_file(filename):
"""Return true if the filename points to a reference HTML file."""
if (filename.endswith('-expected.html') or
filename.endswith('-expected-mismatch.html')):
- _log.warn("Reftests are not supported - ignoring %s" % filename)
return True
return False
@@ -117,4 +116,4 @@ def _is_reference_html_file(filename):
def _is_test_file(filesystem, dirname, filename):
"""Return true if the filename points to a test file."""
return (_has_supported_extension(filesystem, filename) and
- not _is_reference_html_file(filename))
+ not is_reference_html_file(filename))
diff --git a/Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png.py b/Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png.py
new file mode 100644
index 0000000..70a0502
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# 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.
+
+
+def read_checksum(filehandle):
+ # We expect the comment to be at the beginning of the file.
+ data = filehandle.read(2048)
+ comment_key = 'tEXtchecksum\x00'
+ comment_pos = data.find(comment_key)
+ if comment_pos == -1:
+ return
+
+ checksum_pos = comment_pos + len(comment_key)
+ return data[checksum_pos:checksum_pos + 32]
diff --git a/Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png_unittest.py b/Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png_unittest.py
new file mode 100644
index 0000000..7375741
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png_unittest.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+# 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 StringIO
+import unittest
+from webkitpy.layout_tests import read_checksum_from_png
+
+
+class ReadChecksumFromPngTest(unittest.TestCase):
+ def test_read_checksum(self):
+ # Test a file with 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\x00)tEXtchecksum\x003c4134fe2739880353f91c5b84cadbaaC\xb8?\xec\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\xa9''')
+ checksum = read_checksum_from_png.read_checksum(filehandle)
+ self.assertEquals('3c4134fe2739880353f91c5b84cadbaa', checksum)
+
+ # 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.assertEquals(None, checksum)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
index 24b8c97..9f1d347 100644
--- a/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests.py
@@ -59,8 +59,8 @@ from webkitpy.layout_tests.layout_package import test_expectations
_log = logging.getLogger(__name__)
-BASELINE_SUFFIXES = ['.txt', '.png', '.checksum']
-REBASELINE_PLATFORM_ORDER = ['mac', 'win', 'win-xp', 'win-vista', 'linux']
+BASELINE_SUFFIXES = ('.txt', '.png', '.checksum')
+REBASELINE_PLATFORM_ORDER = ('mac', 'win', 'win-xp', 'win-vista', 'linux')
ARCHIVE_DIR_NAME_DICT = {'win': 'Webkit_Win__deps_',
'win-vista': 'webkit-dbg-vista',
'win-xp': 'Webkit_Win__deps_',
@@ -171,7 +171,7 @@ class Rebaseliner(object):
self._rebaseline_port = port.get(
self._target_port.test_platform_name_to_name(platform), options,
filesystem=self._filesystem, rebaselining=True)
- self._rebaselining_tests = []
+ self._rebaselining_tests = set()
self._rebaselined_tests = []
# Create tests and expectations helper which is used to:
@@ -179,12 +179,8 @@ class Rebaseliner(object):
# -. update the tests in test_expectations file after rebaseline
# is done.
expectations_str = self._rebaseline_port.test_expectations()
- self._test_expectations = \
- test_expectations.TestExpectations(self._rebaseline_port,
- None,
- expectations_str,
- self._rebaseline_port.test_configuration(),
- False)
+ self._test_expectations = test_expectations.TestExpectations(
+ self._rebaseline_port, None, expectations_str, self._rebaseline_port.test_configuration(), False)
self._url_fetcher = url_fetcher
self._zip_factory = zip_factory
self._scm = scm
@@ -194,6 +190,8 @@ class Rebaseliner(object):
log_dashed_string('Compiling rebaselining tests', self._platform)
if not self._compile_rebaselining_tests():
+ return False
+ if not self.get_rebaselining_tests():
return True
log_dashed_string('Downloading archive', self._platform)
@@ -203,30 +201,24 @@ class Rebaseliner(object):
_log.error('No archive found.')
return False
- log_dashed_string('Extracting and adding new baselines',
- self._platform)
+ log_dashed_string('Extracting and adding new baselines', self._platform)
if not self._extract_and_add_new_baselines(archive_file):
archive_file.close()
return False
archive_file.close()
- log_dashed_string('Updating rebaselined tests in file',
- self._platform)
+ log_dashed_string('Updating rebaselined tests in file', self._platform)
self._update_rebaselined_tests_in_file(backup)
_log.info('')
if len(self._rebaselining_tests) != len(self._rebaselined_tests):
- _log.warning('NOT ALL TESTS THAT NEED REBASELINING HAVE BEEN '
- 'REBASELINED.')
- _log.warning(' Total tests needing rebaselining: %d',
- len(self._rebaselining_tests))
- _log.warning(' Total tests rebaselined: %d',
- len(self._rebaselined_tests))
+ _log.warning('NOT ALL TESTS THAT NEED REBASELINING HAVE BEEN REBASELINED.')
+ _log.warning(' Total tests needing rebaselining: %d', len(self._rebaselining_tests))
+ _log.warning(' Total tests rebaselined: %d', len(self._rebaselined_tests))
return False
- _log.warning('All tests needing rebaselining were successfully '
- 'rebaselined.')
+ _log.warning('All tests needing rebaselining were successfully rebaselined.')
return True
@@ -237,26 +229,33 @@ class Rebaseliner(object):
"""Compile list of tests that need rebaselining for the platform.
Returns:
- List of tests that need rebaselining or
- None if there is no such test.
+ False if reftests are wrongly marked as 'needs rebaselining' or True
"""
self._rebaselining_tests = \
self._test_expectations.get_rebaselining_failures()
if not self._rebaselining_tests:
_log.warn('No tests found that need rebaselining.')
- return None
+ return True
+
+ fs = self._target_port._filesystem
+ for test in self._rebaselining_tests:
+ test_abspath = self._target_port.abspath_for_test(test)
+ if (fs.exists(self._target_port.reftest_expected_filename(test_abspath)) or
+ fs.exists(self._target_port.reftest_expected_mismatch_filename(test_abspath))):
+ _log.error('%s seems to be a reftest. We can not rebase for reftests.', test)
+ self._rebaselining_tests = set()
+ return False
- _log.info('Total number of tests needing rebaselining '
- 'for "%s": "%d"', self._platform,
- len(self._rebaselining_tests))
+ _log.info('Total number of tests needing rebaselining for "%s": "%d"',
+ self._platform, len(self._rebaselining_tests))
test_no = 1
for test in self._rebaselining_tests:
_log.info(' %d: %s', test_no, test)
test_no += 1
- return self._rebaselining_tests
+ return True
def _get_latest_revision(self, url):
"""Get the latest layout test revision number from buildbot.
@@ -324,8 +323,7 @@ class Rebaseliner(object):
latest_revision = self._get_latest_revision(url_base)
if latest_revision is None or latest_revision <= 0:
return None
- archive_url = ('%s%s/layout-test-results.zip' % (url_base,
- latest_revision))
+ archive_url = '%s%s/layout-test-results.zip' % (url_base, latest_revision)
_log.info('Archive url: "%s"', archive_url)
return archive_url
@@ -336,7 +334,7 @@ class Rebaseliner(object):
return None
archive_file = zipfileset.ZipFileSet(url, filesystem=self._filesystem,
- zip_factory=self._zip_factory)
+ zip_factory=self._zip_factory)
_log.info('Archive downloaded')
return archive_file
@@ -344,92 +342,83 @@ class Rebaseliner(object):
"""Extract new baselines from the zip file and add them to SVN repository.
Returns:
- List of tests that have been rebaselined or
- None on failure.
- """
-
+ List of tests that have been rebaselined or None on failure."""
zip_namelist = zip_file.namelist()
_log.debug('zip file namelist:')
for name in zip_namelist:
_log.debug(' ' + name)
- platform = self._rebaseline_port.test_platform_name_to_name(
- self._platform)
+ platform = self._rebaseline_port.test_platform_name_to_name(self._platform)
_log.debug('Platform dir: "%s"', platform)
- test_no = 1
self._rebaselined_tests = []
- for test in self._rebaselining_tests:
- _log.info('Test %d: %s', test_no, test)
-
- found = False
- scm_error = False
- test_basename = self._filesystem.splitext(test)[0]
- for suffix in BASELINE_SUFFIXES:
- archive_test_name = ('layout-test-results/%s-actual%s' %
- (test_basename, suffix))
- _log.debug(' Archive test file name: "%s"',
- archive_test_name)
- if not archive_test_name in zip_namelist:
- _log.info(' %s file not in archive.', suffix)
- continue
-
- found = True
- _log.info(' %s file found in archive.', suffix)
-
- # Extract new baseline from archive and save it to a temp file.
- data = zip_file.read(archive_test_name)
- tempfile, temp_name = self._filesystem.open_binary_tempfile(suffix)
- tempfile.write(data)
- tempfile.close()
-
- expected_filename = '%s-expected%s' % (test_basename, suffix)
- expected_fullpath = self._filesystem.join(
- self._rebaseline_port.baseline_path(), expected_filename)
- expected_fullpath = self._filesystem.normpath(expected_fullpath)
- _log.debug(' Expected file full path: "%s"',
- expected_fullpath)
-
- # TODO(victorw): for now, the rebaselining tool checks whether
- # or not THIS baseline is duplicate and should be skipped.
- # We could improve the tool to check all baselines in upper
- # and lower
- # levels and remove all duplicated baselines.
- if self._is_dup_baseline(temp_name,
- expected_fullpath,
- test,
- suffix,
- self._platform):
- self._filesystem.remove(temp_name)
- self._delete_baseline(expected_fullpath)
- continue
-
- self._filesystem.maybe_make_directory(self._filesystem.dirname(expected_fullpath))
-
- self._filesystem.move(temp_name, expected_fullpath)
-
- if 0 != self._scm.add(expected_fullpath, return_exit_code=True):
- # FIXME: print detailed diagnose messages
- scm_error = True
- elif suffix != '.checksum':
- self._create_html_baseline_files(expected_fullpath)
-
- if not found:
- _log.warn(' No new baselines found in archive.')
- else:
- if scm_error:
- _log.warn(' Failed to add baselines to your repository.')
- else:
- _log.info(' Rebaseline succeeded.')
- self._rebaselined_tests.append(test)
-
- test_no += 1
+ for test_no, test in enumerate(self._rebaselining_tests):
+ _log.info('Test %d: %s', test_no + 1, test)
+ self._extract_and_add_new_baseline(test, zip_file)
zip_file.close()
return self._rebaselined_tests
+ def _extract_and_add_new_baseline(self, test, zip_file):
+ found = False
+ scm_error = False
+ test_basename = self._filesystem.splitext(test)[0]
+ for suffix in BASELINE_SUFFIXES:
+ archive_test_name = 'layout-test-results/%s-actual%s' % (test_basename, suffix)
+ _log.debug(' Archive test file name: "%s"', archive_test_name)
+ if not archive_test_name in zip_file.namelist():
+ _log.info(' %s file not in archive.', suffix)
+ continue
+
+ found = True
+ _log.info(' %s file found in archive.', suffix)
+
+ temp_name = self._extract_from_zip_to_tempfile(zip_file, archive_test_name)
+
+ expected_filename = '%s-expected%s' % (test_basename, suffix)
+ expected_fullpath = self._filesystem.join(
+ self._rebaseline_port.baseline_path(), expected_filename)
+ expected_fullpath = self._filesystem.normpath(expected_fullpath)
+ _log.debug(' Expected file full path: "%s"', expected_fullpath)
+
+ # TODO(victorw): for now, the rebaselining tool checks whether
+ # or not THIS baseline is duplicate and should be skipped.
+ # We could improve the tool to check all baselines in upper
+ # and lower levels and remove all duplicated baselines.
+ if self._is_dup_baseline(temp_name, expected_fullpath, test, suffix, self._platform):
+ self._filesystem.remove(temp_name)
+ self._delete_baseline(expected_fullpath)
+ continue
+
+ self._filesystem.maybe_make_directory(self._filesystem.dirname(expected_fullpath))
+ self._filesystem.move(temp_name, expected_fullpath)
+
+ if self._scm.add(expected_fullpath, return_exit_code=True):
+ # FIXME: print detailed diagnose messages
+ scm_error = True
+ elif suffix != '.checksum':
+ self._create_html_baseline_files(expected_fullpath)
+
+ if not found:
+ _log.warn(' No new baselines found in archive.')
+ elif scm_error:
+ _log.warn(' Failed to add baselines to your repository.')
+ else:
+ _log.info(' Rebaseline succeeded.')
+ self._rebaselined_tests.append(test)
+
+ def _extract_from_zip_to_tempfile(self, zip_file, filename):
+ """Extracts |filename| from |zip_file|, a ZipFileSet. Returns the full
+ path name to the extracted file."""
+ data = zip_file.read(filename)
+ suffix = self._filesystem.splitext(filename)[1]
+ tempfile, temp_name = self._filesystem.open_binary_tempfile(suffix)
+ tempfile.write(data)
+ tempfile.close()
+ return temp_name
+
def _is_dup_baseline(self, new_baseline, baseline_path, test, suffix,
platform):
"""Check whether a baseline is duplicate and can fallback to same
@@ -448,25 +437,26 @@ class Rebaseliner(object):
True if the baseline is unnecessary.
False otherwise.
"""
- test_filepath = self._filesystem.join(self._target_port.layout_tests_dir(),
- test)
+ test_filepath = self._filesystem.join(self._target_port.layout_tests_dir(), test)
all_baselines = self._rebaseline_port.expected_baselines(
test_filepath, suffix, True)
- for (fallback_dir, fallback_file) in all_baselines:
- if fallback_dir and fallback_file:
- fallback_fullpath = self._filesystem.normpath(
- self._filesystem.join(fallback_dir, fallback_file))
- if fallback_fullpath.lower() != baseline_path.lower():
- new_output = self._filesystem.read_binary_file(new_baseline)
- fallback_output = self._filesystem.read_binary_file(fallback_fullpath)
- is_image = baseline_path.lower().endswith('.png')
- if not self._diff_baselines(new_output, fallback_output,
- is_image):
- _log.info(' Found same baseline at %s',
- fallback_fullpath)
- return True
- else:
- return False
+
+ for fallback_dir, fallback_file in all_baselines:
+ if not fallback_dir or not fallback_file:
+ continue
+
+ fallback_fullpath = self._filesystem.normpath(
+ self._filesystem.join(fallback_dir, fallback_file))
+ if fallback_fullpath.lower() == baseline_path.lower():
+ continue
+
+ new_output = self._filesystem.read_binary_file(new_baseline)
+ fallback_output = self._filesystem.read_binary_file(fallback_fullpath)
+ is_image = baseline_path.lower().endswith('.png')
+ if not self._diff_baselines(new_output, fallback_output, is_image):
+ _log.info(' Found same baseline at %s', fallback_fullpath)
+ return True
+ return False
return False
@@ -483,8 +473,8 @@ class Rebaseliner(object):
if is_image:
return self._port.diff_image(output1, output2, None)
- else:
- return self._port.compare_text(output1, output2)
+
+ return self._port.compare_text(output1, output2)
def _delete_baseline(self, filename):
"""Remove the file from repository and delete it from disk.
@@ -508,14 +498,12 @@ class Rebaseliner(object):
"""
if self._rebaselined_tests:
- new_expectations = (
- self._test_expectations.remove_platform_from_expectations(
- self._rebaselined_tests, self._platform))
+ new_expectations = self._test_expectations.remove_platform_from_expectations(
+ self._rebaselined_tests, self._platform)
path = self._target_port.path_to_test_expectations_file()
if backup:
- date_suffix = time.strftime('%Y%m%d%H%M%S',
- time.localtime(time.time()))
- backup_file = ('%s.orig.%s' % (path, date_suffix))
+ date_suffix = time.strftime('%Y%m%d%H%M%S', time.localtime(time.time()))
+ backup_file = '%s.orig.%s' % (path, date_suffix)
if self._filesystem.exists(backup_file):
self._filesystem.remove(backup_file)
_log.info('Saving original file to "%s"', backup_file)
@@ -541,8 +529,7 @@ class Rebaseliner(object):
# Copy the new baseline to html directory for result comparison.
baseline_filename = self._filesystem.basename(baseline_fullpath)
new_file = get_result_file_fullpath(self._filesystem, self._options.html_directory,
- baseline_filename, self._platform,
- 'new')
+ baseline_filename, self._platform, 'new')
self._filesystem.copyfile(baseline_fullpath, new_file)
_log.info(' Html: copied new baseline file from "%s" to "%s".',
baseline_fullpath, new_file)
@@ -554,19 +541,16 @@ class Rebaseliner(object):
_log.info(e)
output = ""
- if (not output) or (output.upper().rstrip().endswith(
- 'NO SUCH FILE OR DIRECTORY')):
+ if (not output) or (output.upper().rstrip().endswith('NO SUCH FILE OR DIRECTORY')):
_log.info(' No base file: "%s"', baseline_fullpath)
return
base_file = get_result_file_fullpath(self._filesystem, self._options.html_directory,
- baseline_filename, self._platform,
- 'old')
+ baseline_filename, self._platform, 'old')
if base_file.upper().endswith('.PNG'):
self._filesystem.write_binary_file(base_file, output)
else:
self._filesystem.write_text_file(base_file, output)
- _log.info(' Html: created old baseline file: "%s".',
- base_file)
+ _log.info(' Html: created old baseline file: "%s".', base_file)
# Get the diff between old and new baselines and save to the html dir.
if baseline_filename.upper().endswith('.TXT'):
@@ -576,8 +560,7 @@ class Rebaseliner(object):
self._options.html_directory, baseline_filename,
self._platform, 'diff')
self._filesystem.write_text_file(diff_file, output)
- _log.info(' Html: created baseline diff file: "%s".',
- diff_file)
+ _log.info(' Html: created baseline diff file: "%s".', diff_file)
class HtmlGenerator(object):
@@ -663,8 +646,7 @@ class HtmlGenerator(object):
_log.debug(html)
self._filesystem.write_text_file(self._html_file, html)
- _log.info('Baseline comparison html generated at "%s"',
- self._html_file)
+ _log.info('Baseline comparison html generated at "%s"', self._html_file)
def show_html(self):
"""Launch the rebaselining html in brwoser."""
@@ -716,8 +698,7 @@ class HtmlGenerator(object):
'name': baseline_filename}
diff_file = get_result_file_fullpath(self._filesystem, self._html_directory,
- baseline_filename, platform,
- 'diff')
+ baseline_filename, platform, 'diff')
_log.info(' Baseline diff file: "%s"', diff_file)
if self._filesystem.exists(diff_file):
links += html_td_link % {'uri': self.abspath_to_uri(diff_file),
@@ -747,11 +728,9 @@ class HtmlGenerator(object):
_log.info(' Checking %s files', suffix)
for platform in self._platforms:
- links = self._generate_baseline_links(test_basename, suffix,
- platform)
+ links = self._generate_baseline_links(test_basename, suffix, platform)
if links:
- row = self.HTML_TD_NOLINK % self._get_baseline_result_type(
- suffix)
+ row = self.HTML_TD_NOLINK % self._get_baseline_result_type(suffix)
row += self.HTML_TD_NOLINK % platform
row += links
_log.debug(' html row: %s', row)
diff --git a/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py b/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py
index c50e1c4..7179bb7 100644
--- a/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/rebaseline_chromium_webkit_tests_unittest.py
@@ -174,6 +174,20 @@ class TestRebaseliner(unittest.TestCase):
rebaseliner.run(False)
self.assertEqual(len(filesystem.written_files), 1)
+ def test_rebaselining_tests(self):
+ rebaseliner, filesystem = self.make_rebaseliner(
+ "BUGX REBASELINE MAC : failures/expected/image.html = IMAGE")
+ compile_success = rebaseliner._compile_rebaselining_tests()
+ self.assertTrue(compile_success)
+ self.assertEqual(set(['failures/expected/image.html']), rebaseliner.get_rebaselining_tests())
+
+ def test_rebaselining_tests_should_ignore_reftests(self):
+ rebaseliner, filesystem = self.make_rebaseliner(
+ "BUGX REBASELINE : failures/expected/reftest.html = IMAGE")
+ compile_success = rebaseliner._compile_rebaselining_tests()
+ self.assertFalse(compile_success)
+ self.assertFalse(rebaseliner.get_rebaselining_tests())
+
def test_one_platform(self):
rebaseliner, filesystem = self.make_rebaseliner(
"BUGX REBASELINE MAC : failures/expected/image.html = IMAGE")
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
index 3fe7b14..7076ef2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
@@ -55,6 +55,7 @@ from webkitpy.layout_tests import port
from webkitpy.layout_tests import run_webkit_tests
from webkitpy.layout_tests.layout_package import dump_render_tree_thread
from webkitpy.layout_tests.port.test import TestPort, TestDriver
+from webkitpy.layout_tests.port.test_files import is_reference_html_file
from webkitpy.python24.versioning import compare_version
from webkitpy.test.skip import skip_if
@@ -72,8 +73,8 @@ def parse_args(extra_args=None, record_results=False, tests_included=False,
args.extend(['--platform', 'test'])
if not record_results:
args.append('--no-record-results')
- if not '--child-processes' in extra_args:
- args.extend(['--worker-model', 'old-inline'])
+ if not '--child-processes' in extra_args and not '--worker-model' in extra_args:
+ args.extend(['--worker-model', 'inline'])
args.extend(extra_args)
if not tests_included:
# We use the glob to test that globbing works.
@@ -124,7 +125,8 @@ def run_and_capture(port_obj, options, parsed_args):
return (res, buildbot_output, regular_output)
-def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False, filesystem=None):
+def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False,
+ filesystem=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
@@ -136,6 +138,7 @@ def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False,
test_batches = []
+
class RecordingTestDriver(TestDriver):
def __init__(self, port, worker_number):
TestDriver.__init__(self, port, worker_number)
@@ -153,7 +156,11 @@ def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False,
self._current_test_batch = []
test_batches.append(self._current_test_batch)
test_name = self._port.relative_test_filename(test_input.filename)
- self._current_test_batch.append(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.
+ if include_reference_html or not is_reference_html_file(test_input.filename):
+ self._current_test_batch.append(test_name)
return TestDriver.run_test(self, test_input)
class RecordingTestPort(TestPort):
@@ -190,13 +197,13 @@ class MainTest(unittest.TestCase):
def test_child_process_1(self):
(res, buildbot_output, regular_output, user) = logging_run(
- ['--print', 'config', '--child-processes', '1'])
+ ['--print', 'config', '--worker-model', 'threads', '--child-processes', '1'])
self.assertTrue('Running one DumpRenderTree\n'
in regular_output.get())
def test_child_processes_2(self):
(res, buildbot_output, regular_output, user) = logging_run(
- ['--print', 'config', '--child-processes', '2'])
+ ['--print', 'config', '--worker-model', 'threads', '--child-processes', '2'])
self.assertTrue('Running 2 DumpRenderTrees in parallel\n'
in regular_output.get())
@@ -352,7 +359,12 @@ class MainTest(unittest.TestCase):
# Run tests including the unexpected failures.
self._url_opened = None
res, out, err, user = logging_run(tests_included=True)
- self.assertEqual(res, 3)
+
+ # 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_tests_count = 5
+
+ self.assertEqual(res, unexpected_tests_count)
self.assertFalse(out.empty())
self.assertFalse(err.empty())
self.assertEqual(user.opened_urls, ['/tmp/layout-test-results/results.html'])
@@ -458,6 +470,32 @@ class MainTest(unittest.TestCase):
tests_included=True)
self.assertEqual(user.opened_urls, ['/tmp/foo/results.html'])
+ # 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.
+ def assert_run_order(self, worker_model, child_processes='1'):
+ tests_run = get_tests_run(['--worker-model', worker_model,
+ '--child-processes', child_processes, 'passes'],
+ tests_included=True, flatten_batches=True)
+ self.assertEquals(tests_run, sorted(tests_run))
+
+ tests_run = get_tests_run(['--worker-model', worker_model,
+ '--child-processes', child_processes, 'http/tests/passes'],
+ tests_included=True, flatten_batches=True)
+ self.assertEquals(tests_run, sorted(tests_run))
+
+ def test_run_order__inline(self):
+ self.assert_run_order('inline')
+
+ def test_run_order__old_inline(self):
+ self.assert_run_order('old-inline')
+
+ def test_run_order__threads(self):
+ self.assert_run_order('old-inline', child_processes='2')
+
+ def test_run_order__old_threads(self):
+ self.assert_run_order('old-threads', child_processes='2')
+
def test_tolerance(self):
class ImageDiffTestPort(TestPort):
def diff_image(self, expected_contents, actual_contents,
@@ -487,11 +525,11 @@ class MainTest(unittest.TestCase):
def test_worker_model__inline(self):
self.assertTrue(passing_run(['--worker-model', 'inline']))
- def test_worker_model__old_inline_with_child_processes(self):
- res, out, err, user = logging_run(['--worker-model', 'old-inline',
+ def test_worker_model__inline_with_child_processes(self):
+ res, out, err, user = logging_run(['--worker-model', 'inline',
'--child-processes', '2'])
self.assertEqual(res, 0)
- self.assertTrue('--worker-model=old-inline overrides --child-processes\n' in err.get())
+ self.assertTrue('--worker-model=inline overrides --child-processes\n' in err.get())
def test_worker_model__old_inline(self):
self.assertTrue(passing_run(['--worker-model', 'old-inline']))
@@ -516,6 +554,25 @@ class MainTest(unittest.TestCase):
self.assertRaises(ValueError, logging_run,
['--worker-model', 'unknown'])
+ def test_reftest_run(self):
+ tests_run = get_tests_run(['passes/reftest.html'], tests_included=True, flatten_batches=True)
+ self.assertEquals(['passes/reftest.html'], 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)
+ self.assertEquals([], 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.assertEquals(['passes/reftest.html', 'passes/reftest-expected.html'], tests_run)
+
+ 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.assertEquals(['passes/mismatch.html', 'passes/mismatch-expected-mismatch.html'], tests_run)
+
+
MainTest = skip_if(MainTest, sys.platform == 'cygwin' and compare_version(sys, '2.6')[0] < 0, 'new-run-webkit-tests tests hang on Cygwin Python 2.5.2')
diff --git a/Tools/Scripts/webkitpy/style/checker.py b/Tools/Scripts/webkitpy/style/checker.py
index 975432b..48abcf9 100644
--- a/Tools/Scripts/webkitpy/style/checker.py
+++ b/Tools/Scripts/webkitpy/style/checker.py
@@ -36,6 +36,7 @@ import sys
from checkers.common import categories as CommonCategories
from checkers.common import CarriageReturnChecker
+from checkers.changelog import ChangeLogChecker
from checkers.cpp import CppChecker
from checkers.python import PythonChecker
from checkers.test_expectations import TestExpectationsChecker
@@ -180,6 +181,7 @@ _PATH_RULES_SPECIFIER = [
# struct members. Also, we allow unnecessary parameter names in
# WebKit2 APIs because we're matching CF's header style.
"Source/WebKit2/UIProcess/API/C/",
+ "Source/WebKit2/Shared/API/c/",
"Source/WebKit2/WebProcess/InjectedBundle/API/c/"],
["-readability/naming",
"-readability/parameter_name",
@@ -419,10 +421,11 @@ class FileType:
NONE = 0 # FileType.NONE evaluates to False.
# Alphabetize remaining types
- CPP = 1
- PYTHON = 2
- TEXT = 3
- XML = 4
+ CHANGELOG = 1
+ CPP = 2
+ PYTHON = 3
+ TEXT = 4
+ XML = 5
class CheckerDispatcher(object):
@@ -481,8 +484,9 @@ class CheckerDispatcher(object):
return FileType.PYTHON
elif file_extension in _XML_FILE_EXTENSIONS:
return FileType.XML
- elif (os.path.basename(file_path).startswith('ChangeLog') or
- (not file_extension and os.path.join("Tools", "Scripts") in file_path) or
+ elif os.path.basename(file_path).startswith('ChangeLog'):
+ return FileType.CHANGELOG
+ elif ((not file_extension and os.path.join("Tools", "Scripts") in file_path) or
file_extension in _TEXT_FILE_EXTENSIONS):
return FileType.TEXT
else:
@@ -493,6 +497,11 @@ class CheckerDispatcher(object):
"""Instantiate and return a style checker based on file type."""
if file_type == FileType.NONE:
checker = None
+ elif file_type == FileType.CHANGELOG:
+ should_line_be_checked = None
+ if handle_style_error:
+ should_line_be_checked = handle_style_error.should_line_be_checked
+ checker = ChangeLogChecker(file_path, handle_style_error, should_line_be_checked)
elif file_type == FileType.CPP:
file_extension = self._file_extension(file_path)
checker = CppChecker(file_path, file_extension,
diff --git a/Tools/Scripts/webkitpy/style/checker_unittest.py b/Tools/Scripts/webkitpy/style/checker_unittest.py
index a796e0b..144d40a 100755
--- a/Tools/Scripts/webkitpy/style/checker_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checker_unittest.py
@@ -52,6 +52,7 @@ from checker import CheckerDispatcher
from checker import ProcessorBase
from checker import StyleProcessor
from checker import StyleProcessorConfiguration
+from checkers.changelog import ChangeLogChecker
from checkers.cpp import CppChecker
from checkers.python import PythonChecker
from checkers.text import TextChecker
@@ -368,12 +369,10 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
"""Tests dispatch() method of CheckerDispatcher class."""
- def mock_handle_style_error(self):
- pass
-
def dispatch(self, file_path):
"""Call dispatch() with the given file path."""
dispatcher = CheckerDispatcher()
+ self.mock_handle_style_error = DefaultStyleErrorHandler('', None, None, [])
checker = dispatcher.dispatch(file_path,
self.mock_handle_style_error,
min_confidence=3)
@@ -395,6 +394,10 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
"got_class": got_class,
"expected_class": expected_class})
+ def assert_checker_changelog(self, file_path):
+ """Assert that the dispatched checker is a ChangeLogChecker."""
+ self.assert_checker(file_path, ChangeLogChecker)
+
def assert_checker_cpp(self, file_path):
"""Assert that the dispatched checker is a CppChecker."""
self.assert_checker(file_path, CppChecker)
@@ -411,6 +414,25 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
"""Assert that the dispatched checker is a XMLChecker."""
self.assert_checker(file_path, XMLChecker)
+ def test_changelog_paths(self):
+ """Test paths that should be checked as ChangeLog."""
+ paths = [
+ "ChangeLog",
+ "ChangeLog-2009-06-16",
+ os.path.join("Source", "WebCore", "ChangeLog"),
+ ]
+
+ for path in paths:
+ self.assert_checker_changelog(path)
+
+ # Check checker attributes on a typical input.
+ file_path = "ChangeLog"
+ self.assert_checker_changelog(file_path)
+ checker = self.dispatch(file_path)
+ self.assertEquals(checker.file_path, file_path)
+ self.assertEquals(checker.handle_style_error,
+ self.mock_handle_style_error)
+
def test_cpp_paths(self):
"""Test paths that should be checked as C++."""
paths = [
@@ -465,8 +487,6 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
def test_text_paths(self):
"""Test paths that should be checked as text."""
paths = [
- "ChangeLog",
- "ChangeLog-2009-06-16",
"foo.ac",
"foo.cc",
"foo.cgi",
@@ -491,7 +511,6 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
"foo.wm",
"foo.xhtml",
"foo.y",
- os.path.join("Source", "WebCore", "ChangeLog"),
os.path.join("Source", "WebCore", "inspector", "front-end", "inspector.js"),
os.path.join("Tools", "Scripts", "check-webkit-style"),
]
diff --git a/Tools/Scripts/webkitpy/style/checkers/changelog.py b/Tools/Scripts/webkitpy/style/checkers/changelog.py
new file mode 100644
index 0000000..75754fa
--- /dev/null
+++ b/Tools/Scripts/webkitpy/style/checkers/changelog.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2011 Patrick Gansterer <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.
+#
+# 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.
+
+"""Checks WebKit style for ChangeLog files."""
+
+import re
+from common import TabChecker
+from webkitpy.common.net.bugzilla import parse_bug_id_from_changelog
+
+
+class ChangeLogChecker(object):
+
+ """Processes text lines for checking style."""
+
+ def __init__(self, file_path, handle_style_error, should_line_be_checked):
+ self.file_path = file_path
+ self.handle_style_error = handle_style_error
+ self.should_line_be_checked = should_line_be_checked
+ self._tab_checker = TabChecker(file_path, handle_style_error)
+
+ def check_entry(self, first_line_checked, entry_lines):
+ if not entry_lines:
+ return
+ for line in entry_lines:
+ if parse_bug_id_from_changelog(line):
+ break
+ if re.search("Unreviewed", line, re.IGNORECASE):
+ break
+ if re.search("build", line, re.IGNORECASE) and re.search("fix", line, re.IGNORECASE):
+ break
+ else:
+ self.handle_style_error(first_line_checked,
+ "changelog/bugnumber", 5,
+ "ChangeLog entry has no bug number")
+
+ def check(self, lines):
+ self._tab_checker.check(lines)
+ first_line_checked = 0
+ entry_lines = []
+
+ for line_index, line in enumerate(lines):
+ if not self.should_line_be_checked(line_index + 1):
+ # If we transitioned from finding changed lines to
+ # unchanged lines, then we are done.
+ if first_line_checked:
+ break
+ continue
+ if not first_line_checked:
+ first_line_checked = line_index + 1
+ entry_lines.append(line)
+
+ self.check_entry(first_line_checked, entry_lines)
diff --git a/Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py b/Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py
new file mode 100644
index 0000000..02296d3
--- /dev/null
+++ b/Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py
@@ -0,0 +1,155 @@
+#!/usr/bin/env python
+#
+# Copyright (C) 2010 Apple Inc. All rights reserved.
+# Copyright (C) 2011 Patrick Gansterer <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.
+#
+# 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 changelog.py."""
+
+import changelog
+import unittest
+
+
+class ChangeLogCheckerTest(unittest.TestCase):
+ """Tests ChangeLogChecker class."""
+
+ def assert_no_error(self, lines_to_check, changelog_data):
+ def handle_style_error(line_number, category, confidence, message):
+ self.fail('Unexpected error: %d %s %d %s for\n%s' % (line_number, category, confidence, message, changelog_data))
+ self.lines_to_check = set(lines_to_check)
+ checker = changelog.ChangeLogChecker('ChangeLog', handle_style_error, self.mock_should_line_be_checked)
+ checker.check(changelog_data.split('\n'))
+
+ def assert_error(self, expected_line_number, lines_to_check, expected_category, changelog_data):
+ self.had_error = False
+
+ def handle_style_error(line_number, category, confidence, message):
+ self.had_error = True
+ self.assertEquals(expected_line_number, line_number)
+ self.assertEquals(expected_category, category)
+ self.lines_to_check = set(lines_to_check)
+ checker = changelog.ChangeLogChecker('ChangeLog', handle_style_error, self.mock_should_line_be_checked)
+ checker.check(changelog_data.split('\n'))
+ self.assertTrue(self.had_error)
+
+ def mock_handle_style_error(self):
+ pass
+
+ def mock_should_line_be_checked(self, line_number):
+ return line_number in self.lines_to_check
+
+ def test_init(self):
+ checker = changelog.ChangeLogChecker('ChangeLog', self.mock_handle_style_error, self.mock_should_line_be_checked)
+ self.assertEquals(checker.file_path, 'ChangeLog')
+ self.assertEquals(checker.handle_style_error, self.mock_handle_style_error)
+ self.assertEquals(checker.should_line_be_checked, self.mock_should_line_be_checked)
+
+ def test_missing_bug_number(self):
+ self.assert_error(1, range(1, 20), 'changelog/bugnumber',
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n')
+ self.assert_error(1, range(1, 20), 'changelog/bugnumber',
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n'
+ ' http://bugs.webkit.org/show_bug.cgi?id=\n')
+ self.assert_error(1, range(1, 20), 'changelog/bugnumber',
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n'
+ ' https://bugs.webkit.org/show_bug.cgi?id=\n')
+ self.assert_error(1, range(1, 20), 'changelog/bugnumber',
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n'
+ ' http://webkit.org/b/\n')
+ self.assert_error(1, range(1, 20), 'changelog/bugnumber',
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug'
+ '\n'
+ ' http://trac.webkit.org/changeset/12345\n')
+ self.assert_error(2, range(2, 5), 'changelog/bugnumber',
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ ' Example bug\n'
+ ' https://bugs.webkit.org/show_bug.cgi\n'
+ '\n'
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ ' Another change\n')
+ self.assert_error(2, range(2, 6), 'changelog/bugnumber',
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ ' Example bug\n'
+ ' More text about bug.\n'
+ '\n'
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' No bug in this change.\n')
+
+ def test_no_error(self):
+ self.assert_no_error([],
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example ChangeLog entry out of range\n'
+ ' http://example.com/\n')
+ self.assert_no_error([],
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n'
+ ' http://bugs.webkit.org/show_bug.cgi?id=12345\n')
+ self.assert_no_error(range(1, 20),
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n'
+ ' http://bugs.webkit.org/show_bug.cgi?id=12345\n')
+ self.assert_no_error(range(1, 20),
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n'
+ ' https://bugs.webkit.org/show_bug.cgi?id=12345\n')
+ self.assert_no_error(range(1, 20),
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Example bug\n'
+ ' http://webkit.org/b/12345\n')
+ self.assert_no_error(range(1, 20),
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Unreview build fix for r12345.\n')
+ self.assert_no_error(range(1, 20),
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Fix build after a bad change.\n')
+ self.assert_no_error(range(1, 20),
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ '\n'
+ ' Fix example port build.\n')
+ self.assert_no_error(range(2, 6),
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ ' Example bug\n'
+ ' https://bugs.webkit.org/show_bug.cgi?id=12345\n'
+ '\n'
+ '2011-01-01 Patrick Gansterer <paroga@paroga.com>\n'
+ ' No bug here!\n')
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/error_handlers.py b/Tools/Scripts/webkitpy/style/error_handlers.py
index 0bede24..5d8b041 100644
--- a/Tools/Scripts/webkitpy/style/error_handlers.py
+++ b/Tools/Scripts/webkitpy/style/error_handlers.py
@@ -123,16 +123,18 @@ class DefaultStyleErrorHandler(object):
return None
return self._configuration.max_reports_per_category[category]
+ def should_line_be_checked(self, line_number):
+ "Returns if a particular line should be checked"
+ # Was the line that was modified?
+ return self._line_numbers is None or line_number in self._line_numbers
+
def __call__(self, line_number, category, confidence, message):
"""Handle the occurrence of a style error.
See the docstring of this module for more information.
"""
- if (self._line_numbers is not None and
- line_number not in self._line_numbers):
- # Then the error occurred in a line that was not modified, so
- # the error is not reportable.
+ if not self.should_line_be_checked(line_number):
return
if not self._configuration.is_reportable(category=category,
diff --git a/Tools/Scripts/webkitpy/test/cat.py b/Tools/Scripts/webkitpy/test/cat.py
index ae1e143..ac56d1c 100644
--- a/Tools/Scripts/webkitpy/test/cat.py
+++ b/Tools/Scripts/webkitpy/test/cat.py
@@ -30,7 +30,7 @@ from webkitpy.common.system import fileutils
def command_arguments(*args):
- return ['python', __file__] + list(args)
+ return [sys.executable, __file__] + list(args)
def main():
diff --git a/Tools/Scripts/webkitpy/test/echo.py b/Tools/Scripts/webkitpy/test/echo.py
index f7468f7..5d4d8e2 100644
--- a/Tools/Scripts/webkitpy/test/echo.py
+++ b/Tools/Scripts/webkitpy/test/echo.py
@@ -30,7 +30,7 @@ from webkitpy.common.system import fileutils
def command_arguments(*args):
- return ['python', __file__] + list(args)
+ return [sys.executable, __file__] + list(args)
def main(args=None):
diff --git a/Tools/Scripts/webkitpy/thirdparty/__init__.py b/Tools/Scripts/webkitpy/thirdparty/__init__.py
index c2249c2..9728492 100644
--- a/Tools/Scripts/webkitpy/thirdparty/__init__.py
+++ b/Tools/Scripts/webkitpy/thirdparty/__init__.py
@@ -70,7 +70,7 @@ installer.install(url="http://pypi.python.org/packages/source/C/ClientForm/Clien
# a new AutoInstaller instance that does not append to the search path.
installer = AutoInstaller(target_dir=autoinstalled_dir)
-installer.install(url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.1.11.zip",
+installer.install(url="http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.4.zip",
url_subpath="mechanize")
installer.install(url="http://pypi.python.org/packages/source/p/pep8/pep8-0.5.0.tar.gz#md5=512a818af9979290cd619cce8e9c2e2b",
url_subpath="pep8-0.5.0/pep8.py")
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
index b22138d..c5d9001 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
@@ -178,8 +178,6 @@ class CommitQueueTask(object):
self._delegate.report_flaky_tests(self._patch, flaky_test_results, results_archive)
def _test_patch(self):
- if self._patch.is_rollout():
- return True
if self._test():
return True
@@ -220,12 +218,13 @@ class CommitQueueTask(object):
return False
if not self._apply():
return self.report_failure()
- if not self._build():
- if not self._build_without_patch():
+ if not self._patch.is_rollout():
+ if not self._build():
+ if not self._build_without_patch():
+ return False
+ return self.report_failure()
+ if not self._test_patch():
return False
- return self.report_failure()
- if not self._test_patch():
- return False
# Make sure the patch is still valid before landing (e.g., make sure
# no one has set commit-queue- since we started working on the patch.)
if not self._validate():
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
index 8f5c9e6..e2fb09f 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -293,8 +293,6 @@ MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update']
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', 106]
MOCK: update_status: commit-queue Applied patch
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=both']
-MOCK: update_status: commit-queue Built patch
MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'land-attachment', '--force-clean', '--ignore-builders', '--non-interactive', '--parent-command=commit-queue', 106]
MOCK: update_status: commit-queue Landed patch
MOCK: update_status: commit-queue Pass
diff --git a/Tools/Scripts/webkitpy/tool/commands/upload.py b/Tools/Scripts/webkitpy/tool/commands/upload.py
index e455b18..80715a7 100644
--- a/Tools/Scripts/webkitpy/tool/commands/upload.py
+++ b/Tools/Scripts/webkitpy/tool/commands/upload.py
@@ -37,7 +37,7 @@ from optparse import make_option
from webkitpy.tool import steps
from webkitpy.common.config.committers import CommitterList
-from webkitpy.common.net.bugzilla import parse_bug_id
+from webkitpy.common.net.bugzilla import parse_bug_id_from_changelog
from webkitpy.common.system.deprecated_logging import error, log
from webkitpy.common.system.user import User
from webkitpy.thirdparty.mock import Mock
@@ -173,6 +173,21 @@ class ObsoleteAttachments(AbstractSequencedCommand):
return { "bug_id" : args[0] }
+class AttachToBug(AbstractSequencedCommand):
+ name = "attach-to-bug"
+ help_text = "Attach the the file to the bug"
+ argument_names = "BUGID FILEPATH"
+ steps = [
+ steps.AttachToBug,
+ ]
+
+ def _prepare_state(self, options, args, tool):
+ state = {}
+ state["bug_id"] = args[0]
+ state["filepath"] = args[1]
+ return state
+
+
class AbstractPatchUploadingCommand(AbstractSequencedCommand):
def _bug_id(self, options, args, tool, state):
# Perfer a bug id passed as an argument over a bug url in the diff (i.e. ChangeLogs).
@@ -311,7 +326,7 @@ class PostCommits(AbstractDeclarativeCommand):
commit_message = tool.scm().commit_message_for_local_commit(commit_id)
# Prefer --bug-id=, then a bug url in the commit message, then a bug url in the entire commit diff (i.e. ChangeLogs).
- bug_id = options.bug_id or parse_bug_id(commit_message.message()) or parse_bug_id(tool.scm().create_patch(git_commit=commit_id))
+ bug_id = options.bug_id or parse_bug_id_from_changelog(commit_message.message()) or parse_bug_id_from_changelog(tool.scm().create_patch(git_commit=commit_id))
if not bug_id:
log("Skipping %s: No bug id found in commit or specified with --bug-id." % commit_id)
continue
@@ -351,7 +366,7 @@ class MarkBugFixed(AbstractDeclarativeCommand):
commit_log = self._fetch_commit_log(tool, svn_revision)
if not bug_id:
- bug_id = parse_bug_id(commit_log)
+ bug_id = parse_bug_id_from_changelog(commit_log)
if not svn_revision:
match = re.search("^r(?P<svn_revision>\d+) \|", commit_log, re.MULTILINE)
diff --git a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
index b5f5ae9..4313df9 100644
--- a/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/upload_unittest.py
@@ -68,6 +68,25 @@ MOCK: user.open_url: http://example.com/42
"""
self.assert_execute_outputs(Post(), [42], options=options, expected_stderr=expected_stderr)
+ def test_attach_to_bug(self):
+ options = MockOptions()
+ options.comment = "extra comment"
+ options.description = "file description"
+ expected_stderr = """MOCK add_attachment_to_bug: bug_id=42, description=file description filename=None
+-- Begin comment --
+extra comment
+-- End comment --
+"""
+ self.assert_execute_outputs(AttachToBug(), [42, "path/to/file.txt", "file description"], options=options, expected_stderr=expected_stderr)
+
+ def test_attach_to_bug_no_description_or_comment(self):
+ options = MockOptions()
+ options.comment = None
+ options.description = None
+ expected_stderr = """MOCK add_attachment_to_bug: bug_id=42, description=file.txt filename=None
+"""
+ self.assert_execute_outputs(AttachToBug(), [42, "path/to/file.txt"], options=options, expected_stderr=expected_stderr)
+
def test_land_safely(self):
expected_stderr = "Obsoleting 2 old patches on bug 42\nMOCK add_patch_to_bug: bug_id=42, description=Patch for landing, mark_for_review=False, mark_for_commit_queue=False, mark_for_landing=True\n"
self.assert_execute_outputs(LandSafely(), [42], expected_stderr=expected_stderr)
diff --git a/Tools/Scripts/webkitpy/tool/steps/__init__.py b/Tools/Scripts/webkitpy/tool/steps/__init__.py
index d5d7bb4..a746602 100644
--- a/Tools/Scripts/webkitpy/tool/steps/__init__.py
+++ b/Tools/Scripts/webkitpy/tool/steps/__init__.py
@@ -29,6 +29,7 @@
# FIXME: Is this the right way to do this?
from webkitpy.tool.steps.applypatch import ApplyPatch
from webkitpy.tool.steps.applypatchwithlocalcommit import ApplyPatchWithLocalCommit
+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
diff --git a/Tools/Scripts/webkitpy/tool/steps/abstractstep.py b/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
index 1c93d5b..2ba4291 100644
--- a/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
+++ b/Tools/Scripts/webkitpy/tool/steps/abstractstep.py
@@ -40,7 +40,7 @@ class AbstractStep(object):
# FIXME: This should use tool.port()
def _run_script(self, script_name, args=None, quiet=False, port=WebKitPort):
log("Running %s" % script_name)
- command = [port.script_path(script_name)]
+ command = port.script_shell_command(script_name)
if args:
command.extend(args)
self._tool.executive.run_and_throw_if_fail(command, quiet)
diff --git a/Tools/Scripts/webkitpy/tool/steps/attachtobug.py b/Tools/Scripts/webkitpy/tool/steps/attachtobug.py
new file mode 100644
index 0000000..4885fcb
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/steps/attachtobug.py
@@ -0,0 +1,51 @@
+# 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 os
+
+from webkitpy.tool.steps.abstractstep import AbstractStep
+from webkitpy.tool.steps.options import Options
+
+
+class AttachToBug(AbstractStep):
+ @classmethod
+ def options(cls):
+ return AbstractStep.options() + [
+ Options.comment,
+ Options.description,
+ ]
+
+ def run(self, state):
+ filepath = state["filepath"]
+ bug_id = state["bug_id"]
+ description = self._options.description or filepath.split(os.sep)[-1]
+ comment_text = self._options.comment
+
+ # add_attachment_to_bug fills in the filename from the file path.
+ filename = None
+ self._tool.bugs.add_attachment_to_bug(bug_id, filepath, description, filename, comment_text)
diff --git a/Tools/Scripts/webkitpy/tool/steps/commit.py b/Tools/Scripts/webkitpy/tool/steps/commit.py
index 859acbf..5dc4efb 100644
--- a/Tools/Scripts/webkitpy/tool/steps/commit.py
+++ b/Tools/Scripts/webkitpy/tool/steps/commit.py
@@ -58,7 +58,7 @@ class Commit(AbstractStep):
try:
scm = self._tool.scm()
- commit_text = scm.commit_with_message(self._commit_message, git_commit=self._options.git_commit, username=username, force_squash=force_squash)
+ commit_text = scm.commit_with_message(self._commit_message, git_commit=self._options.git_commit, username=username, force_squash=force_squash, changed_files=self._changed_files(state))
svn_revision = scm.svn_revision_from_commit_text(commit_text)
log("Committed r%s: <%s>" % (svn_revision, urls.view_revision_url(svn_revision)))
self._state["commit_text"] = commit_text
diff --git a/Tools/Scripts/webkitpy/tool/steps/options.py b/Tools/Scripts/webkitpy/tool/steps/options.py
index 5b8baf0..3bba3e2 100644
--- a/Tools/Scripts/webkitpy/tool/steps/options.py
+++ b/Tools/Scripts/webkitpy/tool/steps/options.py
@@ -40,7 +40,7 @@ class Options(object):
comment = make_option("--comment", action="store", type="string", dest="comment", help="Comment to post to bug.")
component = make_option("--component", action="store", type="string", dest="component", help="Component for the new bug.")
confirm = make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Skip confirmation steps.")
- description = make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: \"patch\")")
+ description = make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment")
email = make_option("--email", action="store", type="string", dest="email", help="Email address to use in ChangeLogs.")
force_clean = make_option("--force-clean", action="store_true", dest="force_clean", default=False, help="Clean working directory before applying patches (removes local changes and commits)")
force_patch = make_option("--force-patch", action="store_true", dest="force_patch", default=False, help="Forcefully applies the patch, continuing past errors.")
diff --git a/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py b/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
index 17e996c..4be40ca 100644
--- a/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
+++ b/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
@@ -61,7 +61,7 @@ class PrepareChangeLog(AbstractStep):
self._ensure_bug_url(state)
return
os.chdir(self._tool.scm().checkout_root)
- args = [self._tool.port().script_path("prepare-ChangeLog")]
+ args = self._tool.port().script_shell_command("prepare-ChangeLog")
if state.get("bug_id"):
args.append("--bug=%s" % state["bug_id"])
args.append("--description=%s" % self._tool.bugs.fetch_bug(state["bug_id"]).title())
diff --git a/Tools/TestResultServer/handlers/dashboardhandler.py b/Tools/TestResultServer/handlers/dashboardhandler.py
index c8b5ace..fbbd56b 100644
--- a/Tools/TestResultServer/handlers/dashboardhandler.py
+++ b/Tools/TestResultServer/handlers/dashboardhandler.py
@@ -87,11 +87,15 @@ class UpdateDashboardFile(webapp.RequestHandler):
def get(self):
files = self.request.get_all(PARAM_FILE)
if not files:
- files = ["flakiness_dashboard.html",
+ # FIXME: Just grab the entire dashboards directory.
+ files = ["aggregate_results.html",
"dashboard_base.js",
- "aggregate_results.html",
"dygraph-combined.js",
- "timeline_explorer.html"]
+ "flakiness_dashboard.html",
+ "timeline_explorer.html",
+ "treemap.html",
+ "webtreemap.css",
+ "webtreemap.js"]
errors = []
for file in files:
diff --git a/Tools/TestWebKitAPI/Configurations/Base.xcconfig b/Tools/TestWebKitAPI/Configurations/Base.xcconfig
index feb7c5e..4125813 100644
--- a/Tools/TestWebKitAPI/Configurations/Base.xcconfig
+++ b/Tools/TestWebKitAPI/Configurations/Base.xcconfig
@@ -52,12 +52,23 @@ TARGET_GCC_VERSION_1050_ = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_ACTUAL));
TARGET_GCC_VERSION_1050_0310 = GCC_42;
TARGET_GCC_VERSION_1050_0320 = GCC_42;
TARGET_GCC_VERSION_1060 = GCC_42;
-TARGET_GCC_VERSION_1070 = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070 = $(TARGET_GCC_VERSION_1070_$(CONFIGURATION));
+TARGET_GCC_VERSION_1070_Debug = LLVM_COMPILER;
+TARGET_GCC_VERSION_1070_Release = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070_Production = LLVM_GCC_42;
GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
GCC_VERSION_GCC_40 = 4.0;
GCC_VERSION_GCC_42 = 4.2;
GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
+GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0;
+
+// FIXME: Disable C++ exceptions in the LLVM Compiler once it supports enabling Obj-C exceptions without C++ exceptions.
+GCC_ENABLE_CPP_EXCEPTIONS = $(GCC_ENABLE_CPP_EXCEPTIONS_$(TARGET_GCC_VERSION));
+GCC_ENABLE_CPP_EXCEPTIONS_GCC_40 = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_GCC_42 = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_LLVM_GCC = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_LLVM_COMPILER = YES;
// If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK.
SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
diff --git a/Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig b/Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig
index 6bf31b2..7f8c897 100644
--- a/Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig
+++ b/Tools/TestWebKitAPI/Configurations/InjectedBundle.xcconfig
@@ -21,4 +21,5 @@
// (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 = InjectedBundleTestWebKitAPI
+PRODUCT_NAME = InjectedBundleTestWebKitAPI;
+GCC_PREFIX_HEADER = TestWebKitAPIPrefix.h;
diff --git a/Tools/TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops b/Tools/TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops
new file mode 100644
index 0000000..1a5f5ea
--- /dev/null
+++ b/Tools/TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="TestWebKitAPICFNetwork"
+ >
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="CFNetwork$(LibraryConfigSuffix).lib"
+ />
+</VisualStudioPropertySheet>
diff --git a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebug.vsprops b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebug.vsprops
index 565455e..ad76269 100644
--- a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebug.vsprops
+++ b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebug.vsprops
@@ -3,6 +3,6 @@
ProjectType="Visual C++"
Version="8.00"
Name="TestWebKitAPIDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;..\Configurations\TestWebKitAPICommon.vsprops;..\Configurations\TestWebKitAPICoreFoundation.vsprops"
+ InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\TestWebKitAPICommon.vsprops;.\TestWebKitAPICoreFoundation.vsprops;.\TestWebKitAPICFNetwork.vsprops"
>
</VisualStudioPropertySheet>
diff --git a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugAll.vsprops b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugAll.vsprops
index 4b9ffac..cc4a879 100644
--- a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugAll.vsprops
+++ b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugAll.vsprops
@@ -3,6 +3,6 @@
ProjectType="Visual C++"
Version="8.00"
Name="TestWebKitAPIDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;..\Configurations\TestWebKitAPICommon.vsprops;..\Configurations\TestWebKitAPICoreFoundation.vsprops"
+ InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\TestWebKitAPICommon.vsprops;.\TestWebKitAPICoreFoundation.vsprops;.\TestWebKitAPICFNetwork.vsprops"
>
</VisualStudioPropertySheet>
diff --git a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugCairoCFLite.vsprops b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugCairoCFLite.vsprops
index a218ec7..49bb10d 100644
--- a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugCairoCFLite.vsprops
+++ b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIDebugCairoCFLite.vsprops
@@ -3,6 +3,6 @@
ProjectType="Visual C++"
Version="8.00"
Name="TestWebKitAPIDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;..\Configurations\TestWebKitAPICommon.vsprops;..\Configurations\TestWebKitAPICFLite.vsprops"
+ InheritedPropertySheets="$(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;..\Configurations\TestWebKitAPICommon.vsprops;..\Configurations\TestWebKitAPICFLite.vsprops"
>
</VisualStudioPropertySheet>
diff --git a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIRelease.vsprops b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIRelease.vsprops
index f98fbfc..e7a103c 100644
--- a/Tools/TestWebKitAPI/Configurations/TestWebKitAPIRelease.vsprops
+++ b/Tools/TestWebKitAPI/Configurations/TestWebKitAPIRelease.vsprops
@@ -3,6 +3,6 @@
ProjectType="Visual C++"
Version="8.00"
Name="TestWebKitAPIRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;..\Configurations\TestWebKitAPICommon.vsprops;..\Configurations\TestWebKitAPICoreFoundation.vsprops"
+ InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\TestWebKitAPICommon.vsprops;.\TestWebKitAPICoreFoundation.vsprops;.\TestWebKitAPICFNetwork.vsprops"
>
</VisualStudioPropertySheet>
diff --git a/Tools/TestWebKitAPI/PlatformUtilities.h b/Tools/TestWebKitAPI/PlatformUtilities.h
index 219a5dc..a682545 100644
--- a/Tools/TestWebKitAPI/PlatformUtilities.h
+++ b/Tools/TestWebKitAPI/PlatformUtilities.h
@@ -43,6 +43,7 @@ WKContextRef createContextForInjectedBundleTest(const std::string&, WKTypeRef us
WKStringRef createInjectedBundlePath();
WKURLRef createURLForResource(const char* resource, const char* extension);
WKURLRef URLForNonExistentResource();
+WKRetainPtr<WKStringRef> MIMETypeForWKURLResponse(WKURLResponseRef);
bool isKeyDown(WKNativeEventPtr);
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
index 079b7ff..c5c9555 100644
--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
@@ -18,6 +18,9 @@
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 */; };
+ BC246D8E132F115A00B56D7C /* AboutBlankLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */; };
+ BC246D9A132F1FE100B56D7C /* CanHandleRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC246D98132F1FE100B56D7C /* CanHandleRequest.cpp */; };
+ BC246D9C132F1FF000B56D7C /* CanHandleRequest_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC246D97132F1FE100B56D7C /* CanHandleRequest_Bundle.cpp */; };
BC2D004912A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2D004812A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp */; };
BC2D006412AA04CE00E732A3 /* file-with-anchor.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = BC2D004A12A9FEB300E732A3 /* file-with-anchor.html */; };
BC575A90126E74D3006F0F12 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB9E9F011235BDE00A137E0 /* Cocoa.framework */; };
@@ -54,6 +57,8 @@
C0ADBE9612FCA79B00D2C129 /* simple-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C0ADBE8412FCA6B600D2C129 /* simple-form.html */; };
C0BD669D131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0BD669C131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp */; };
C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */; };
+ F6C59E38132AC5E000176C09 /* SendingMessagesToTheWebProcessBeforeItIsValid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6C59E37132AC5DF00176C09 /* SendingMessagesToTheWebProcessBeforeItIsValid.cpp */; };
+ F6F3F29113342FEB00A6BF19 /* CookieManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6F3F29013342FEB00A6BF19 /* CookieManager.cpp */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -110,6 +115,9 @@
BC131A9A1171316900B69727 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
BC131A9E1171317C00B69727 /* TestWebKitAPIPrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestWebKitAPIPrefix.h; sourceTree = "<group>"; };
BC131AA8117131FC00B69727 /* TestsController.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = TestsController.cpp; sourceTree = "<group>"; };
+ BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AboutBlankLoad.cpp; sourceTree = "<group>"; };
+ BC246D97132F1FE100B56D7C /* CanHandleRequest_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanHandleRequest_Bundle.cpp; sourceTree = "<group>"; };
+ BC246D98132F1FE100B56D7C /* CanHandleRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CanHandleRequest.cpp; sourceTree = "<group>"; };
BC2D004812A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageLoadDidChangeLocationWithinPageForFrame.cpp; sourceTree = "<group>"; };
BC2D004A12A9FEB300E732A3 /* file-with-anchor.html */ = {isa = PBXFileReference; explicitFileType = text.html; fileEncoding = 4; path = "file-with-anchor.html"; sourceTree = "<group>"; };
BC575946126E7351006F0F12 /* InjectedBundleMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleMain.cpp; sourceTree = "<group>"; };
@@ -153,6 +161,8 @@
C0ADBE8412FCA6B600D2C129 /* simple-form.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "simple-form.html"; sourceTree = "<group>"; };
C0BD669C131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResponsivenessTimerDoesntFireEarly.cpp; sourceTree = "<group>"; };
C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResponsivenessTimerDoesntFireEarly_Bundle.cpp; sourceTree = "<group>"; };
+ F6C59E37132AC5DF00176C09 /* SendingMessagesToTheWebProcessBeforeItIsValid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SendingMessagesToTheWebProcessBeforeItIsValid.cpp; sourceTree = "<group>"; };
+ F6F3F29013342FEB00A6BF19 /* CookieManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CookieManager.cpp; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -257,6 +267,10 @@
isa = PBXGroup;
children = (
BC90977B125571AE00083756 /* Resources */,
+ BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */,
+ BC246D97132F1FE100B56D7C /* CanHandleRequest_Bundle.cpp */,
+ BC246D98132F1FE100B56D7C /* CanHandleRequest.cpp */,
+ F6F3F29013342FEB00A6BF19 /* CookieManager.cpp */,
BCB6803F126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp */,
BCB68041126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp */,
1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */,
@@ -275,6 +289,7 @@
C0BD669C131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp */,
C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */,
C0ADBE8212FCA6AA00D2C129 /* RestoreSessionStateContainingFormData.cpp */,
+ F6C59E37132AC5DF00176C09 /* SendingMessagesToTheWebProcessBeforeItIsValid.cpp */,
C02B77F1126612140026BF0F /* SpacebarScrolling.cpp */,
BC7B619A1299FE9E00D174A4 /* WKPreferences.cpp */,
BC90995D12567BC100083756 /* WKString.cpp */,
@@ -429,6 +444,10 @@
1ADBEFAE130C689C00D61D19 /* ForceRepaint.cpp in Sources */,
4BFDFFA9131477770061F24B /* HitTestResultNodeHandle.cpp in Sources */,
C0BD669D131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp in Sources */,
+ F6C59E38132AC5E000176C09 /* SendingMessagesToTheWebProcessBeforeItIsValid.cpp in Sources */,
+ BC246D8E132F115A00B56D7C /* AboutBlankLoad.cpp in Sources */,
+ BC246D9A132F1FE100B56D7C /* CanHandleRequest.cpp in Sources */,
+ F6F3F29113342FEB00A6BF19 /* CookieManager.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -444,6 +463,7 @@
BCB68042126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp in Sources */,
4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */,
C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */,
+ BC246D9C132F1FF000B56D7C /* CanHandleRequest_Bundle.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/TestWebKitAPI/TestWebKitAPIPrefix.h b/Tools/TestWebKitAPI/TestWebKitAPIPrefix.h
index 00e14ad..ee56430 100644
--- a/Tools/TestWebKitAPI/TestWebKitAPIPrefix.h
+++ b/Tools/TestWebKitAPI/TestWebKitAPIPrefix.h
@@ -36,6 +36,10 @@
#endif
+/* FIXME: Define these properly once USE(EXPORT_MACROS) is set for ports using this */
+#define JS_EXPORT_PRIVATE
+#define WTF_EXPORT_PRIVATE
+
#include <stdint.h>
#include <WebKit2/WebKit2.h>
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp
new file mode 100644
index 0000000..27180e3
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp
@@ -0,0 +1,60 @@
+/*
+ * 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 "Test.h"
+
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include <WebKit2/WebKit2.h>
+
+namespace TestWebKitAPI {
+
+static bool done;
+
+static void decidePolicyForResponse(WKPageRef, WKFrameRef, WKURLResponseRef response, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef, const void*)
+{
+ TEST_ASSERT(WKStringIsEqualToUTF8CString(Util::MIMETypeForWKURLResponse(response).get(), "text/html"));
+
+ WKFramePolicyListenerUse(listener);
+ done = true;
+}
+
+TEST(WebKit2, AboutBlankLoad)
+{
+ WKRetainPtr<WKContextRef> context = Util::adoptWK(WKContextCreate());
+ PlatformWebView webView(context.get());
+
+ WKPagePolicyClient policyClient;
+ memset(&policyClient, 0, sizeof(policyClient));
+
+ policyClient.decidePolicyForResponse = decidePolicyForResponse;
+ WKPageSetPagePolicyClient(webView.page(), &policyClient);
+
+ WKPageLoadURL(webView.page(), Util::adoptWK(WKURLCreateWithUTF8CString("about:blank")).get());
+
+ Util::run(&done);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp
new file mode 100644
index 0000000..8460847
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp
@@ -0,0 +1,72 @@
+/*
+ * 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 "Test.h"
+
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include <WebKit2/WKContextPrivate.h>
+#include <WebKit2/WKNumber.h>
+
+namespace TestWebKitAPI {
+
+static bool didReceiveMessage;
+static bool canHandleRequest;
+
+static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messageName, WKTypeRef body, const void*)
+{
+ didReceiveMessage = true;
+
+ TEST_ASSERT(WKStringIsEqualToUTF8CString(messageName, "DidCheckCanHandleRequest"));
+ TEST_ASSERT(WKGetTypeID(body) == WKBooleanGetTypeID());
+ canHandleRequest = WKBooleanGetValue(static_cast<WKBooleanRef>(body));
+}
+
+static void setInjectedBundleClient(WKContextRef context)
+{
+ WKContextInjectedBundleClient injectedBundleClient;
+ memset(&injectedBundleClient, 0, sizeof(injectedBundleClient));
+ injectedBundleClient.didReceiveMessageFromInjectedBundle = didReceiveMessageFromInjectedBundle;
+
+ WKContextSetInjectedBundleClient(context, &injectedBundleClient);
+}
+
+TEST(WebKit2, CanHandleRequest)
+{
+ WKRetainPtr<WKContextRef> context = Util::adoptWK(Util::createContextForInjectedBundleTest("CanHandleRequestTest"));
+ setInjectedBundleClient(context.get());
+
+ _WKContextRegisterURLSchemeAsEmptyDocument(context.get(), Util::toWK("emptyscheme").get());
+
+ PlatformWebView webView(context.get());
+
+ WKPageLoadURL(webView.page(), Util::adoptWK(Util::createURLForResource("simple", "html")).get());
+
+ WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("CheckCanHandleRequest").get(), 0);
+ Util::run(&didReceiveMessage);
+ TEST_ASSERT(canHandleRequest);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp
new file mode 100644
index 0000000..a253362
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp
@@ -0,0 +1,66 @@
+/*
+ * 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 "InjectedBundleTest.h"
+
+#include "PlatformUtilities.h"
+#include <WebKit2/WKBundlePage.h>
+
+namespace TestWebKitAPI {
+
+class CanHandleRequestTest : public InjectedBundleTest {
+public:
+ CanHandleRequestTest(const std::string& identifier);
+
+private:
+ virtual void didReceiveMessage(WKBundleRef, WKStringRef messageName, WKTypeRef messageBody);
+};
+
+static InjectedBundleTest::Register<CanHandleRequestTest> registrar("CanHandleRequestTest");
+
+CanHandleRequestTest::CanHandleRequestTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
+{
+}
+
+static bool canHandleURL(const char* url)
+{
+ return WKBundlePageCanHandleRequest(Util::adoptWK(WKURLRequestCreateWithWKURL(Util::adoptWK(WKURLCreateWithUTF8CString(url)).get())).get());
+}
+
+static bool runTest()
+{
+ return canHandleURL("about:blank") && canHandleURL("emptyscheme://") && !canHandleURL("notascheme://");
+}
+
+void CanHandleRequestTest::didReceiveMessage(WKBundleRef bundle, WKStringRef messageName, WKTypeRef)
+{
+ if (!WKStringIsEqualToUTF8CString(messageName, "CheckCanHandleRequest"))
+ return;
+
+ WKBundlePostMessage(bundle, Util::toWK("DidCheckCanHandleRequest").get(), Util::adoptWK(WKBooleanCreate(runTest())).get());
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp
new file mode 100644
index 0000000..cc4fc43
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp
@@ -0,0 +1,88 @@
+/*
+ * 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 "Test.h"
+
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include <WebKit2/WKCookieManager.h>
+#include <WebKit2/WKRetainPtr.h>
+#include <WebKit2/WebKit2.h>
+
+namespace TestWebKitAPI {
+
+static bool testDone;
+// Make sure that the policy on the machine running the test is not changed after running the test.
+static WKHTTPCookieAcceptPolicy userPolicy;
+static WKHTTPCookieAcceptPolicy testPolicy;
+static WKRetainPtr<WKContextRef> wkContext;
+
+static void didGetTestHTTPCookieAcceptPolicy(WKHTTPCookieAcceptPolicy policy, WKErrorRef, void* context)
+{
+ TEST_ASSERT(context == reinterpret_cast<void*>(0x1234578));
+ TEST_ASSERT(policy == testPolicy);
+ WKCookieManagerRef cookieManager = WKContextGetCookieManager(wkContext.get());
+ WKCookieManagerSetHTTPCookieAcceptPolicy(cookieManager, userPolicy);
+
+ testDone = true;
+}
+
+static void didGetUserHTTPCookieAcceptPolicy(WKHTTPCookieAcceptPolicy policy, WKErrorRef, void* context)
+{
+ TEST_ASSERT(context == reinterpret_cast<void*>(0x1234578));
+
+ userPolicy = policy;
+
+ // Make sure to choose a policy different from the policy the user currently has set.
+ testPolicy = (userPolicy + 1) % 3;
+ WKCookieManagerRef cookieManager = WKContextGetCookieManager(wkContext.get());
+ WKCookieManagerSetHTTPCookieAcceptPolicy(cookieManager, testPolicy);
+ WKCookieManagerGetHTTPCookieAcceptPolicy(cookieManager, reinterpret_cast<void*>(0x1234578), didGetTestHTTPCookieAcceptPolicy);
+}
+
+static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
+{
+ WKCookieManagerRef cookieManager = WKContextGetCookieManager(wkContext.get());
+ WKCookieManagerGetHTTPCookieAcceptPolicy(cookieManager, reinterpret_cast<void*>(0x1234578), didGetUserHTTPCookieAcceptPolicy);
+}
+
+TEST(WebKit2, CookieManager)
+{
+ wkContext.adopt(WKContextCreate());
+ PlatformWebView webView(wkContext.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+
+ loaderClient.version = 0;
+ loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+ WKPageLoadURL(webView.page(), Util::adoptWK(WKURLCreateWithUTF8CString("about:blank")).get());
+
+ Util::run(&testDone);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/SendingMessagesToTheWebProcessBeforeItIsValid.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/SendingMessagesToTheWebProcessBeforeItIsValid.cpp
new file mode 100644
index 0000000..d48ba31
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/SendingMessagesToTheWebProcessBeforeItIsValid.cpp
@@ -0,0 +1,42 @@
+/*
+ * 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 "Test.h"
+
+#include <WebKit2/WKRetainPtr.h>
+#include <WebKit2/WKContext.h>
+
+namespace TestWebKitAPI {
+
+TEST(WebKit2, SendingMessagesToTheWebProcessBeforeItIsValid)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+
+ // Neither of these calls should cause a crash.
+ WKContextClearResourceCaches(context.get(), kWKAllResourceCaches);
+ WKContextClearResourceCaches(context.get(), kWKInMemoryResourceCachesOnly);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp
new file mode 100644
index 0000000..c3560bd
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp
@@ -0,0 +1,41 @@
+/*
+ * 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 "Test.h"
+
+#include <WebKit2/WKRetainPtr.h>
+#include <WebKit2/WKURLResponseCF.h>
+#include <wtf/RetainPtr.h>
+
+namespace TestWebKitAPI {
+
+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()));
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm b/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm
index 57ec675..234223f 100644
--- a/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm
+++ b/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm
@@ -28,7 +28,9 @@
#include <WebKit2/WKRetainPtr.h>
#include <WebKit2/WKStringCF.h>
#include <WebKit2/WKURLCF.h>
+#include <WebKit2/WKURLResponseNS.h>
#include <WebKit2/WebKit2.h>
+#include <wtf/RetainPtr.h>
namespace TestWebKitAPI {
namespace Util {
@@ -62,6 +64,12 @@ WKURLRef URLForNonExistentResource()
return WKURLCreateWithCFURL((CFURLRef)nsURL);
}
+WKRetainPtr<WKStringRef> MIMETypeForWKURLResponse(WKURLResponseRef wkResponse)
+{
+ RetainPtr<NSURLResponse> response(AdoptNS, WKURLResponseCopyNSURLResponse(wkResponse));
+ return adoptWK(WKStringCreateWithCFString((CFStringRef)[response.get() MIMEType]));
+}
+
bool isKeyDown(WKNativeEventPtr event)
{
return [event type] == NSKeyDown;
diff --git a/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp b/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
index 8ed2fbf..181d88e 100644
--- a/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
+++ b/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
@@ -29,6 +29,10 @@
#include <WebKit2/WKURLCF.h>
#include <wtf/RetainPtr.h>
+#if USE(CFNETWORK)
+#include <WebKit2/WKURLResponseCF.h>
+#endif
+
namespace TestWebKitAPI {
namespace Util {
@@ -81,6 +85,16 @@ 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;
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPI.sln b/Tools/TestWebKitAPI/win/TestWebKitAPI.sln
index 4202817..c2728d3 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPI.sln
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPI.sln
@@ -19,7 +19,7 @@ Global
Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32
Debug|Win32 = Debug|Win32
Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32
- Release_LTCG|Win32 = Release_LTCG|Win32
+ Production|Win32 = Production|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
@@ -31,8 +31,8 @@ Global
{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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release_LTCG|Win32.Build.0 = Release_LTCG|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
@@ -43,8 +43,8 @@ Global
{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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release_LTCG|Win32.Build.0 = Release_LTCG|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
@@ -55,8 +55,8 @@ Global
{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}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Release_LTCG|Win32.Build.0 = Release_LTCG|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
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj b/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
index a894029..468ed71 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
@@ -320,7 +320,7 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
InheritedPropertySheets="..\Configurations\TestWebKitAPIRelease.vsprops"
CharacterSet="1"
@@ -412,6 +412,18 @@
Name="WebKit2"
>
<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>
@@ -448,11 +460,11 @@
>
</File>
<File
- RelativePath="..\Tests\WebKit2\icon.png"
+ RelativePath="..\Tests\WebKit2\HitTestResultNodeHandle.cpp"
>
</File>
<File
- RelativePath="..\Tests\WebKit2\HitTestResultNodeHandle.cpp"
+ RelativePath="..\Tests\WebKit2\icon.png"
>
</File>
<File
@@ -480,6 +492,10 @@
>
</File>
<File
+ RelativePath="..\Tests\WebKit2\SendingMessagesToTheWebProcessBeforeItIsValid.cpp"
+ >
+ </File>
+ <File
RelativePath="..\Tests\WebKit2\simple-accelerated-compositing.html"
>
</File>
@@ -519,6 +535,26 @@
>
</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>
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj b/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
index d52560a..78bbdbf 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
@@ -42,7 +42,7 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
>
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj b/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj
index 3b18238..faf8059 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj
+++ b/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj
@@ -198,7 +198,7 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="2"
InheritedPropertySheets="..\Configurations\TestWebKitAPIRelease.vsprops;..\Configurations\TestWebKitAPIInjectedBundleCommon.vsprops"
CharacterSet="1"
@@ -400,6 +400,10 @@
Name="WebKit2"
>
<File
+ RelativePath="..\Tests\WebKit2\CanHandleRequest_Bundle.cpp"
+ >
+ </File>
+ <File
RelativePath="..\Tests\WebKit2\DocumentStartUserScriptAlertCrash_Bundle.cpp"
>
</File>
diff --git a/Tools/WebKitAPITest/HostWindow.cpp b/Tools/WebKitAPITest/HostWindow.cpp
index b364831..e35e96c 100644
--- a/Tools/WebKitAPITest/HostWindow.cpp
+++ b/Tools/WebKitAPITest/HostWindow.cpp
@@ -22,6 +22,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "HostWindow.h"
namespace WebKitAPITest {
diff --git a/Tools/WebKitAPITest/TestsController.cpp b/Tools/WebKitAPITest/TestsController.cpp
index 08b193a..c5cf23a 100644
--- a/Tools/WebKitAPITest/TestsController.cpp
+++ b/Tools/WebKitAPITest/TestsController.cpp
@@ -22,6 +22,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestsController.h"
#include "Test.h"
diff --git a/Tools/WebKitAPITest/WebKitAPITest.vcproj b/Tools/WebKitAPITest/WebKitAPITest.vcproj
index e3d8171..a746e72 100644
--- a/Tools/WebKitAPITest/WebKitAPITest.vcproj
+++ b/Tools/WebKitAPITest/WebKitAPITest.vcproj
@@ -17,7 +17,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\WebKitAPITestCommon.vsprops"
+ InheritedPropertySheets=".\WebKitAPITestDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -78,7 +78,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\WebKitAPITestCommon.vsprops"
+ InheritedPropertySheets=".\WebKitAPITestDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -139,7 +139,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\WebKitAPITestCommon.vsprops"
+ InheritedPropertySheets=".\WebKitAPITestDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -200,7 +200,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WebKitAPITestCommon.vsprops"
+ InheritedPropertySheets=".\WebKitAPITestRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -259,9 +259,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WebKitAPITestCommon.vsprops"
+ InheritedPropertySheets=".\WebKitAPITestProduction.vsprops"
CharacterSet="1"
>
<Tool
@@ -322,7 +322,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\WebKitAPITestCommon.vsprops"
+ InheritedPropertySheets=".\WebKitAPITestReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
diff --git a/Tools/WebKitAPITest/WebKitAPITestDebug.vsprops b/Tools/WebKitAPITest/WebKitAPITestDebug.vsprops
new file mode 100644
index 0000000..a3c44c4
--- /dev/null
+++ b/Tools/WebKitAPITest/WebKitAPITestDebug.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITestDebug"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ .\WebKitAPITestCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitAPITest/WebKitAPITestDebugAll.vsprops b/Tools/WebKitAPITest/WebKitAPITestDebugAll.vsprops
new file mode 100644
index 0000000..5a0a820
--- /dev/null
+++ b/Tools/WebKitAPITest/WebKitAPITestDebugAll.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITestDebugAll"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;
+ .\WebKitAPITestCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitAPITest/WebKitAPITestDebugCairoCFLite.vsprops b/Tools/WebKitAPITest/WebKitAPITestDebugCairoCFLite.vsprops
new file mode 100644
index 0000000..ad9f812
--- /dev/null
+++ b/Tools/WebKitAPITest/WebKitAPITestDebugCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITestDebugCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;
+ .\WebKitAPITestCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitAPITest/WebKitAPITestProduction.vsprops b/Tools/WebKitAPITest/WebKitAPITestProduction.vsprops
new file mode 100644
index 0000000..45cb5c9
--- /dev/null
+++ b/Tools/WebKitAPITest/WebKitAPITestProduction.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITestProduction"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ .\WebKitAPITestCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitAPITest/WebKitAPITestRelease.vsprops b/Tools/WebKitAPITest/WebKitAPITestRelease.vsprops
new file mode 100644
index 0000000..e89d3e7
--- /dev/null
+++ b/Tools/WebKitAPITest/WebKitAPITestRelease.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITestRelease"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ .\WebKitAPITestCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitAPITest/WebKitAPITestReleaseCairoCFLite.vsprops b/Tools/WebKitAPITest/WebKitAPITestReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..8c1a3c3
--- /dev/null
+++ b/Tools/WebKitAPITest/WebKitAPITestReleaseCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitAPITestReleaseCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\WebKitAPITestCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitAPITest/config.h b/Tools/WebKitAPITest/config.h
new file mode 100644
index 0000000..bee51ac
--- /dev/null
+++ b/Tools/WebKitAPITest/config.h
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+#ifndef WebKitAPITests_config_h
+#define WebKitAPITests_config_h
+
+#include <wtf/Platform.h>
+
+/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */
+#if USE(EXPORT_MACROS)
+
+#include <wtf/ExportMacros.h>
+
+#define WTF_EXPORT_PRIVATE WTF_IMPORT
+#define JS_EXPORT_PRIVATE WTF_IMPORT
+#define WEBKIT_EXPORTDATA WTF_IMPORT
+
+#define JS_EXPORTDATA JS_EXPORT_PRIVATE
+#define JS_EXPORTCLASS JS_EXPORT_PRIVATE
+
+#else /* !USE(EXPORT_MACROS) */
+
+#if OS(WINDOWS) && !COMPILER(GCC) && !defined(BUILDING_WX__)
+#define JS_EXPORTDATA __declspec(dllimport)
+#define WEBKIT_EXPORTDATA __declspec(dllimport)
+#else
+#define JS_EXPORTDATA
+#define WEBKIT_EXPORTDATA
+#endif
+
+#define WTF_EXPORT_PRIVATE JS_EXPORTDATA
+#define JS_EXPORT_PRIVATE JS_EXPORTDATA
+
+#endif /* USE(EXPORT_MACROS) */
+
+#endif
diff --git a/Tools/WebKitAPITest/main.cpp b/Tools/WebKitAPITest/main.cpp
index 8b54b01..dddba20 100644
--- a/Tools/WebKitAPITest/main.cpp
+++ b/Tools/WebKitAPITest/main.cpp
@@ -22,6 +22,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
+
#include "TestsController.h"
using namespace WebKitAPITest;
diff --git a/Tools/WebKitAPITest/tests/WebViewDestruction.cpp b/Tools/WebKitAPITest/tests/WebViewDestruction.cpp
index 6c09e6f..b7ae0b6 100644
--- a/Tools/WebKitAPITest/tests/WebViewDestruction.cpp
+++ b/Tools/WebKitAPITest/tests/WebViewDestruction.cpp
@@ -22,6 +22,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
+
#include "HostWindow.h"
#include "Test.h"
#include <WebCore/COMPtr.h>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj b/Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj
index f0038e6..336839b 100644
--- a/Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj
+++ b/Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WebKitLauncherWinCommon.vsprops"
+ InheritedPropertySheets=".\WebKitLauncherWinRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -77,9 +77,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WebKitLauncherWinCommon.vsprops"
+ InheritedPropertySheets=".\WebKitLauncherWinProduction.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -141,7 +141,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\WebKitLauncherWinCommon.vsprops"
+ InheritedPropertySheets=".\WebKitLauncherWinDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -202,7 +202,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\WebKitLauncherWinDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -263,7 +263,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\WebKitLauncherWinCommon.vsprops"
+ InheritedPropertySheets=".\WebKitLauncherWinReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -324,7 +324,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\WebKitLauncherWinDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops
new file mode 100644
index 0000000..39a0ded
--- /dev/null
+++ b/Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops
@@ -0,0 +1,11 @@
+<?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
new file mode 100644
index 0000000..fff95b7
--- /dev/null
+++ b/Tools/WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..60c4b5b
--- /dev/null
+++ b/Tools/WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..853abfb
--- /dev/null
+++ b/Tools/WebKitLauncherWin/WebKitLauncherWinProduction.vsprops
@@ -0,0 +1,12 @@
+<?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\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ .\WebKitLauncherWinCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops
new file mode 100644
index 0000000..1b906ef
--- /dev/null
+++ b/Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops
@@ -0,0 +1,11 @@
+<?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\release.vsprops;
+ .\WebKitLauncherWinCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..d635f3e
--- /dev/null
+++ b/Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\WebKitLauncherWinCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/Configurations/Base.xcconfig b/Tools/WebKitTestRunner/Configurations/Base.xcconfig
index ac2ff94..3780150 100644
--- a/Tools/WebKitTestRunner/Configurations/Base.xcconfig
+++ b/Tools/WebKitTestRunner/Configurations/Base.xcconfig
@@ -52,12 +52,23 @@ TARGET_GCC_VERSION_1050_ = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_ACTUAL));
TARGET_GCC_VERSION_1050_0310 = GCC_42;
TARGET_GCC_VERSION_1050_0320 = GCC_42;
TARGET_GCC_VERSION_1060 = GCC_42;
-TARGET_GCC_VERSION_1070 = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070 = $(TARGET_GCC_VERSION_1070_$(CONFIGURATION));
+TARGET_GCC_VERSION_1070_Debug = LLVM_COMPILER;
+TARGET_GCC_VERSION_1070_Release = LLVM_GCC_42;
+TARGET_GCC_VERSION_1070_Production = LLVM_GCC_42;
GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
GCC_VERSION_GCC_40 = 4.0;
GCC_VERSION_GCC_42 = 4.2;
GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
+GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0;
+
+// FIXME: Disable C++ exceptions in the LLVM Compiler once it supports enabling Obj-C exceptions without C++ exceptions.
+GCC_ENABLE_CPP_EXCEPTIONS = $(GCC_ENABLE_CPP_EXCEPTIONS_$(TARGET_GCC_VERSION));
+GCC_ENABLE_CPP_EXCEPTIONS_GCC_40 = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_GCC_42 = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_LLVM_GCC = NO;
+GCC_ENABLE_CPP_EXCEPTIONS_LLVM_COMPILER = YES;
// If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK.
SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
diff --git a/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig b/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig
index dcf4be0..e3b72fe 100644
--- a/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig
+++ b/Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig
@@ -21,4 +21,4 @@
// (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 = WebKitTestRunnerInjectedBundle
+PRODUCT_NAME = WebKitTestRunnerInjectedBundle;
diff --git a/Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops b/Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops
new file mode 100644
index 0000000..70da2ba
--- /dev/null
+++ b/Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitTestRunnerCoreGraphics"
+ >
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="CoreGraphics$(LibraryConfigSuffix).lib"
+ />
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp b/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp
index a62cb2e..e3cf58c 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/JSWrapper.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "JSWrapper.h"
#include <JavaScriptCore/JSContextRefPrivate.h>
diff --git a/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp b/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
index 73de45b..cc1720e 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "EventSendingController.h"
#include "InjectedBundle.h"
diff --git a/Tools/WebKitTestRunner/InjectedBundle/GCController.cpp b/Tools/WebKitTestRunner/InjectedBundle/GCController.cpp
index 0eba2df..10c21db 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/GCController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/GCController.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "GCController.h"
#include "InjectedBundle.h"
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index 00933bd..ec6b723 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "InjectedBundle.h"
#include "ActivateFonts.h"
@@ -49,6 +50,7 @@ InjectedBundle::InjectedBundle()
: m_bundle(0)
, m_topLoadingFrame(0)
, m_state(Idle)
+ , m_dumpPixels(false)
{
}
@@ -128,7 +130,9 @@ void InjectedBundle::resetLocalSettings()
void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody)
{
if (WKStringIsEqualToUTF8CString(messageName, "BeginTest")) {
- ASSERT(!messageBody);
+ ASSERT(messageBody);
+ ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
+ m_dumpPixels = WKBooleanGetValue(static_cast<WKBooleanRef>(messageBody));
WKRetainPtr<WKStringRef> ackMessageName(AdoptWK, WKStringCreateWithUTF8CString("Ack"));
WKRetainPtr<WKStringRef> ackMessageBody(AdoptWK, WKStringCreateWithUTF8CString("BeginTest"));
@@ -138,6 +142,7 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag
return;
} else if (WKStringIsEqualToUTF8CString(messageName, "Reset")) {
m_state = Idle;
+ m_dumpPixels = false;
resetLocalSettings();
@@ -154,6 +159,7 @@ void InjectedBundle::beginTesting()
m_state = Testing;
m_outputStream.str("");
+ m_pixelResult.clear();
m_layoutTestController = LayoutTestController::create();
m_gcController = GCController::create();
@@ -161,6 +167,7 @@ void InjectedBundle::beginTesting()
WKBundleSetShouldTrackVisitedLinks(m_bundle, false);
WKBundleRemoveAllVisitedLinks(m_bundle);
+ WKBundleOverrideAllowUniversalAccessFromFileURLsForTestRunner(m_bundle, m_pageGroup, true);
WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);
@@ -181,9 +188,8 @@ void InjectedBundle::done()
WKRetainPtr<WKStringRef> textOutput(AdoptWK, WKStringCreateWithUTF8CString(m_outputStream.str().c_str()));
WKDictionaryAddItem(doneMessageBody.get(), textOutputKey.get(), textOutput.get());
- WKRetainPtr<WKStringRef> textOnlyKey(AdoptWK, WKStringCreateWithUTF8CString("TextOnly"));
- WKRetainPtr<WKBooleanRef> textOnly(AdoptWK, WKBooleanCreate(!m_layoutTestController->shouldDumpPixels()));
- WKDictionaryAddItem(doneMessageBody.get(), textOnlyKey.get(), textOnly.get());
+ WKRetainPtr<WKStringRef> pixelResultKey = adoptWK(WKStringCreateWithUTF8CString("PixelResult"));
+ WKDictionaryAddItem(doneMessageBody.get(), pixelResultKey.get(), m_pixelResult.get());
WKBundlePostMessage(m_bundle, doneMessageName.get(), doneMessageBody.get());
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
index 41b1b31..3090614 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
@@ -30,6 +30,7 @@
#include "GCController.h"
#include "LayoutTestController.h"
#include <WebKit2/WKBase.h>
+#include <WebKit2/WKRetainPtr.h>
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
@@ -62,12 +63,15 @@ public:
void done();
std::ostringstream& os() { return m_outputStream; }
+ void setPixelResult(WKImageRef image) { m_pixelResult = image; }
bool isTestRunning() { return m_state == Testing; }
WKBundleFrameRef topLoadingFrame() { return m_topLoadingFrame; }
void setTopLoadingFrame(WKBundleFrameRef frame) { m_topLoadingFrame = frame; }
+ bool shouldDumpPixels() const { return m_dumpPixels; }
+
private:
InjectedBundle();
~InjectedBundle();
@@ -105,6 +109,10 @@ private:
Stopping
};
State m_state;
+
+ bool m_dumpPixels;
+
+ WKRetainPtr<WKImageRef> m_pixelResult;
};
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
index 4e7f58b..7244077 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundleMain.cpp
@@ -23,6 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
+
#include "InjectedBundle.h"
#include <WebKit2/WKBundleInitialize.h>
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 3ce081e..3b73174 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -23,13 +23,13 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "InjectedBundlePage.h"
#include "InjectedBundle.h"
#include "StringFunctions.h"
#include <cmath>
#include <JavaScriptCore/JSRetainPtr.h>
-#include <WebCore/KURL.h>
#include <WebKit2/WKArray.h>
#include <WebKit2/WKBundle.h>
#include <WebKit2/WKBundleBackForwardList.h>
@@ -43,11 +43,6 @@ using namespace std;
namespace WTR {
-template<typename T> static inline WKRetainPtr<T> adoptWK(T item)
-{
- return WKRetainPtr<T>(AdoptWK, item);
-}
-
static bool hasPrefix(const string& searchString, const string& prefix)
{
return searchString.length() >= prefix.length() && searchString.substr(0, prefix.length()) == prefix;
@@ -218,6 +213,8 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
0, /*mouseDidMoveOverElement*/
0, /*pageDidScroll*/
0, /*paintCustomOverhangArea*/
+ 0, /*shouldGenerateFileForUpload*/
+ 0, /*generateFileForUpload*/
};
WKBundlePageSetUIClient(m_page, &uiClient);
@@ -526,6 +523,9 @@ void InjectedBundlePage::dump()
if (InjectedBundle::shared().layoutTestController()->shouldDumpBackForwardListsForAllWindows())
InjectedBundle::shared().dumpBackForwardListsForAllPages();
+ if (InjectedBundle::shared().shouldDumpPixels() && InjectedBundle::shared().layoutTestController()->shouldDumpPixels())
+ InjectedBundle::shared().setPixelResult(adoptWK(WKBundlePageCreateSnapshotInViewCoordinates(m_page, WKBundleFrameGetVisibleContentBounds(WKBundlePageGetMainFrame(m_page)), kWKImageOptionsShareable)).get());
+
InjectedBundle::shared().done();
}
@@ -634,15 +634,15 @@ WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKB
if (InjectedBundle::shared().isTestRunning() && InjectedBundle::shared().layoutTestController()->willSendRequestReturnsNull())
return 0;
- string urlString = toSTD(adoptWK(WKURLCopyString(adoptWK(WKURLRequestCopyURL(request)).get())));
- WebCore::KURL url(WebCore::ParsedURLString, urlString.c_str());
-
- if (!url.host().isEmpty()
- && (equalIgnoringCase(url.protocol(), "http") || (equalIgnoringCase(url.protocol(), "https")))
- && (url.host() != "127.0.0.1")
- && (url.host() != "255.255.255.255") // used in some tests that expect to get back an error
- && (!equalIgnoringCase(url.host(), "localhost"))) {
- InjectedBundle::shared().os() << "Blocked access to external URL " << urlString << "\n";
+ WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
+ WKRetainPtr<WKStringRef> host = adoptWK(WKURLCopyHostName(url.get()));
+ WKRetainPtr<WKStringRef> scheme = adoptWK(WKURLCopyScheme(url.get()));
+ if (host && !WKStringIsEmpty(host.get())
+ && (WKStringIsEqualToUTF8CStringIgnoringCase(scheme.get(), "http") || WKStringIsEqualToUTF8CStringIgnoringCase(scheme.get(), "https"))
+ && !WKStringIsEqualToUTF8CString(host.get(), "127.0.0.1")
+ && !WKStringIsEqualToUTF8CString(host.get(), "255.255.255.255") // Used in some tests that expect to get back an error.
+ && !WKStringIsEqualToUTF8CStringIgnoringCase(host.get(), "localhost")) {
+ InjectedBundle::shared().os() << "Blocked access to external URL " << url << "\n";
return 0;
}
diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index 96a0d47..7c49d03 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "LayoutTestController.h"
#include "InjectedBundle.h"
@@ -301,6 +302,11 @@ void LayoutTestController::setXSSAuditorEnabled(bool enabled)
WKBundleOverrideXSSAuditorEnabledForTestRunner(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), true);
}
+void LayoutTestController::setAllowUniversalAccessFromFileURLs(bool enabled)
+{
+ WKBundleOverrideAllowUniversalAccessFromFileURLsForTestRunner(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
+}
+
unsigned LayoutTestController::windowCount()
{
return InjectedBundle::shared().pageCount();
diff --git a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index 6733380..b37f102 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -74,6 +74,7 @@ public:
void setCanOpenWindows(bool);
void setCloseRemainingWindowsWhenComplete(bool value) { m_shouldCloseExtraWindows = value; }
void setXSSAuditorEnabled(bool);
+ void setAllowUniversalAccessFromFileURLs(bool);
// Special DOM functions.
JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element);
diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp b/Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp
index 9c4bc68..cb6b633 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp
@@ -27,6 +27,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "ActivateFonts.h"
#include <QApplication>
@@ -56,8 +57,9 @@ void activateFonts()
if (appFontSet && numFonts >= 0 && appFontSet->nfont == numFonts)
return;
- QByteArray fontDir = getenv("WEBKIT_TESTFONTS");
- if (fontDir.isEmpty() || !QDir(fontDir).exists()) {
+ char* const fontDir = getenv("WEBKIT_TESTFONTS");
+ const QString fontDirString = QString::fromLocal8Bit(fontDir);
+ if (fontDirString.isEmpty() || !QDir(fontDirString).exists()) {
fprintf(stderr,
"\n\n"
"----------------------------------------------------------------------\n"
@@ -76,7 +78,7 @@ void activateFonts()
configFile += "/Tools/DumpRenderTree/qt/fonts.conf";
if (!FcConfigParseAndLoad (config, (FcChar8*) configFile.data(), true))
qFatal("Couldn't load font configuration file");
- if (!FcConfigAppFontAddDir (config, (FcChar8*) fontDir.data()))
+ if (!FcConfigAppFontAddDir (config, (FcChar8*) fontDir))
qFatal("Couldn't add font dir!");
FcConfigSetCurrent(config);
@@ -84,17 +86,19 @@ void activateFonts()
numFonts = appFontSet->nfont;
#endif
- QApplication::setGraphicsSystem("raster");
+ QApplication::setGraphicsSystem(QLatin1String("raster"));
QApplication::setStyle(new QWindowsStyle);
- QFont f("Sans Serif");
+ QFont f(QLatin1String("Sans Serif"));
f.setPointSize(9);
f.setWeight(QFont::Normal);
f.setStyle(QFont::StyleNormal);
QApplication::setFont(f);
+#if defined(Q_WS_X11)
QX11Info::setAppDpiX(0, 96);
QX11Info::setAppDpiY(0, 96);
+#endif
}
}
diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp b/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp
index 52502ed..78ec37c 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "InjectedBundle.h"
namespace WTR {
diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp b/Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp
index b515326..91f49ea 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp
@@ -24,6 +24,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "LayoutTestController.h"
#include "InjectedBundle.h"
diff --git a/Tools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp b/Tools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp
index d9f08c9..410d60f 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/win/ActivateFonts.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "ActivateFonts.h"
#include <string>
diff --git a/Tools/WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp b/Tools/WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp
index af8eaed..c70514a 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "InjectedBundle.h"
namespace WTR {
diff --git a/Tools/WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp b/Tools/WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp
index 39cd727..7c500f2 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "LayoutTestController.h"
#include "InjectedBundle.h"
diff --git a/Tools/WebKitTestRunner/StringFunctions.h b/Tools/WebKitTestRunner/StringFunctions.h
index 2d0ca72..33e391d 100644
--- a/Tools/WebKitTestRunner/StringFunctions.h
+++ b/Tools/WebKitTestRunner/StringFunctions.h
@@ -44,9 +44,14 @@ namespace WTR {
// Conversion functions
+template<typename T> static inline WKRetainPtr<T> adoptWK(const T item)
+{
+ return WKRetainPtr<T>(AdoptWK, item);
+}
+
inline WKRetainPtr<WKStringRef> toWK(JSStringRef string)
{
- return WKRetainPtr<WKStringRef>(AdoptWK, WKStringCreateWithJSString(string));
+ return adoptWK(WKStringCreateWithJSString(string));
}
inline WKRetainPtr<WKStringRef> toWK(JSRetainPtr<JSStringRef> string)
@@ -92,6 +97,19 @@ inline std::ostream& operator<<(std::ostream& out, const WKRetainPtr<WKStringRef
return out << stringRef.get();
}
+inline std::ostream& operator<<(std::ostream& out, WKURLRef urlRef)
+{
+ if (!urlRef)
+ return out;
+
+ return out << toSTD(adoptWK(WKURLCopyString(urlRef)));
+}
+
+inline std::ostream& operator<<(std::ostream& out, const WKRetainPtr<WKURLRef>& urlRef)
+{
+ return out << urlRef.get();
+}
+
} // namespace WTR
#endif // StringFunctions_h
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index d12fff6..42331da 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestController.h"
#include "PlatformWebView.h"
@@ -168,6 +169,7 @@ WKPageRef TestController::createOtherPage(WKPageRef oldPage, WKDictionaryRef, WK
0, // printFrame
runModal,
0, // didCompleteRubberBandForMainFrame
+ 0, // saveDataToFileInDownloadsFolder
};
WKPageSetPageUIClient(newPage, &otherPageUIClient);
@@ -301,6 +303,7 @@ void TestController::initialize(int argc, const char* argv[])
0, // printFrame
0, // runModal
0, // didCompleteRubberBandForMainFrame
+ 0, // saveDataToFileInDownloadsFolder
};
WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient);
@@ -353,6 +356,8 @@ bool TestController::resetStateToConsistentValues()
WKPreferencesSetJavaScriptCanOpenWindowsAutomatically(preferences, true);
WKPreferencesSetJavaScriptCanAccessClipboard(preferences, true);
WKPreferencesSetDOMPasteAllowed(preferences, true);
+ WKPreferencesSetUniversalAccessFromFileURLsAllowed(preferences, true);
+ WKPreferencesSetFileAccessFromFileURLsAllowed(preferences, true);
static WKStringRef standardFontFamily = WKStringCreateWithUTF8CString("Times");
static WKStringRef cursiveFontFamily = WKStringCreateWithUTF8CString("Apple Chancery");
diff --git a/Tools/WebKitTestRunner/TestInvocation.cpp b/Tools/WebKitTestRunner/TestInvocation.cpp
index 3227be9..7fb70f5 100644
--- a/Tools/WebKitTestRunner/TestInvocation.cpp
+++ b/Tools/WebKitTestRunner/TestInvocation.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestInvocation.h"
#include "PlatformWebView.h"
@@ -132,8 +133,9 @@ void TestInvocation::invoke()
{
sizeWebViewForCurrentTest(m_pathOrURL.c_str());
- WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("BeginTest"));
- WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), 0);
+ WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("BeginTest"));
+ WKRetainPtr<WKBooleanRef> dumpPixels = adoptWK(WKBooleanCreate(m_dumpPixels));
+ WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), dumpPixels.get());
TestController::shared().runUntil(m_gotInitialResponse, TestController::ShortTimeout);
if (!m_gotInitialResponse) {
@@ -166,6 +168,8 @@ void TestInvocation::dump(const char* stringToDump)
fputs("#EOF\n", stdout);
fputs("#EOF\n", stderr);
+ fflush(stdout);
+ fflush(stderr);
}
void TestInvocation::didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody)
@@ -198,15 +202,16 @@ void TestInvocation::didReceiveMessageFromInjectedBundle(WKStringRef messageName
WKRetainPtr<WKStringRef> textOutputKey(AdoptWK, WKStringCreateWithUTF8CString("TextOutput"));
WKStringRef textOutput = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, textOutputKey.get()));
- WKRetainPtr<WKStringRef> textOnlyKey(AdoptWK, WKStringCreateWithUTF8CString("TextOnly"));
- bool textOnly = WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(messageBodyDictionary, textOnlyKey.get())));
+ WKRetainPtr<WKStringRef> pixelResultKey = adoptWK(WKStringCreateWithUTF8CString("PixelResult"));
+ WKImageRef pixelResult = static_cast<WKImageRef>(WKDictionaryGetItemForKey(messageBodyDictionary, pixelResultKey.get()));
+ ASSERT(!pixelResult || m_dumpPixels);
// Dump text.
dump(toSTD(textOutput).c_str());
// Dump pixels (if necessary).
- if (m_dumpPixels && !textOnly)
- dumpPixelsAndCompareWithExpected();
+ if (m_dumpPixels && pixelResult)
+ dumpPixelsAndCompareWithExpected(pixelResult);
fputs("#EOF\n", stdout);
fflush(stdout);
diff --git a/Tools/WebKitTestRunner/TestInvocation.h b/Tools/WebKitTestRunner/TestInvocation.h
index d5a4af9..9abd7e9 100644
--- a/Tools/WebKitTestRunner/TestInvocation.h
+++ b/Tools/WebKitTestRunner/TestInvocation.h
@@ -46,7 +46,7 @@ public:
private:
void dump(const char*);
- void dumpPixelsAndCompareWithExpected();
+ void dumpPixelsAndCompareWithExpected(WKImageRef);
WKRetainPtr<WKURLRef> m_url;
std::string m_pathOrURL;
diff --git a/Tools/WebKitTestRunner/WebKitTestRunner.sln b/Tools/WebKitTestRunner/WebKitTestRunner.sln
index 3384503..13db4b4 100644
--- a/Tools/WebKitTestRunner/WebKitTestRunner.sln
+++ b/Tools/WebKitTestRunner/WebKitTestRunner.sln
@@ -32,7 +32,7 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_All|Win32 = Debug_All|Win32
Debug|Win32 = Debug|Win32
- Release_LTCG|Win32 = Release_LTCG|Win32
+ Production|Win32 = Production|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
@@ -40,48 +40,48 @@ Global
{3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.Build.0 = Debug_All|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.ActiveCfg = Debug|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug|Win32.Build.0 = Debug|Win32
- {3B99669B-1817-443B-BCBE-835580146668}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {3B99669B-1817-443B-BCBE-835580146668}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Production|Win32.ActiveCfg = Production|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.Production|Win32.Build.0 = Production|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.Build.0 = Debug_All|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.ActiveCfg = Debug|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug|Win32.Build.0 = Debug|Win32
- {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Production|Win32.ActiveCfg = Production|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Production|Win32.Build.0 = Production|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.ActiveCfg = Release|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.Build.0 = Release|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = Debug_All|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.ActiveCfg = Debug|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug|Win32.Build.0 = Debug|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {DA31DA52-6675-48D4-89E0-333A7144397C}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Production|Win32.ActiveCfg = Production|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.Production|Win32.Build.0 = Production|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = Release|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|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_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Production|Win32.ActiveCfg = Production|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Production|Win32.Build.0 = Production|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.ActiveCfg = Debug|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug|Win32.Build.0 = Debug|Win32
- {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {CBC3391C-F060-4BF5-A66E-81404168816B}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Production|Win32.ActiveCfg = Production|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.Production|Win32.Build.0 = Production|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.Build.0 = Debug_All|Win32
{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_LTCG|Win32.ActiveCfg = Release_LTCG|Win32
- {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_LTCG|Win32.Build.0 = Release_LTCG|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Production|Win32.ActiveCfg = Production|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Production|Win32.Build.0 = Production|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
diff --git a/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj b/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
index 62105cd..64c5493 100644
--- a/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
+++ b/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
@@ -32,8 +32,6 @@
6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */; };
6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */; };
6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */; };
- 65DD1D9612FFE798004B5285 /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65DD1D9512FFE798004B5285 /* WebCore.framework */; };
- 65DE432512FFE84000171BCA /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65DD1D9512FFE798004B5285 /* WebCore.framework */; };
65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */; };
BC14E4DB120E02D000826C0C /* GCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14E4D9120E02D000826C0C /* GCController.cpp */; };
BC14E4EA120E03D800826C0C /* JSGCController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14E4E8120E03D800826C0C /* JSGCController.cpp */; };
@@ -47,10 +45,10 @@
BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC7934AB1190658C005EA8E2 /* WebKit2.framework */; };
BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */; };
BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8C795B11D2785D004535A1 /* TestControllerMac.mm */; };
- BC8DAD5D1315C0EC00EC96FC /* TestInvocationMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8DAD5B1315C0EC00EC96FC /* TestInvocationMac.mm */; };
BC8DAD7B1316D91000EC96FC /* InjectedBundleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */; };
BC8FD8CA120E527F00F3E71A /* EventSendingController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8FD8C9120E527F00F3E71A /* EventSendingController.cpp */; };
BC8FD8D2120E545B00F3E71A /* JSEventSendingController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8FD8D0120E545B00F3E71A /* JSEventSendingController.cpp */; };
+ BC9192051333E4F8003011DC /* TestInvocationCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9192041333E4F8003011DC /* TestInvocationCG.cpp */; };
BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952C0C11F3B965003398B4 /* JSWrapper.cpp */; };
BC952F1F11F3C652003398B4 /* JSLayoutTestController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC952F1D11F3C652003398B4 /* JSLayoutTestController.cpp */; };
BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */; };
@@ -79,6 +77,7 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
+ 378D442213346D00006A777B /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = "<group>"; };
6510A77811EC643800410867 /* ColorBits.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ColorBits.ttf; path = fonts/ColorBits.ttf; sourceTree = "<group>"; };
6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; };
@@ -90,7 +89,6 @@
6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = "<group>"; };
6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = "<group>"; };
6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
- 65DD1D9512FFE798004B5285 /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
65EB859D11EC67CC0034D300 /* ActivateFonts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ActivateFonts.h; sourceTree = "<group>"; };
65EB859F11EC67CC0034D300 /* ActivateFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ActivateFonts.mm; sourceTree = "<group>"; };
8DD76FA10486AA7600D96B5E /* WebKitTestRunner */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = WebKitTestRunner; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -115,13 +113,13 @@
BC7934DD119066EC005EA8E2 /* PlatformWebView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformWebView.h; sourceTree = "<group>"; };
BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformWebViewMac.mm; sourceTree = "<group>"; };
BC8C795B11D2785D004535A1 /* TestControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerMac.mm; sourceTree = "<group>"; };
- BC8DAD5B1315C0EC00EC96FC /* TestInvocationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestInvocationMac.mm; sourceTree = "<group>"; };
BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundleMac.mm; sourceTree = "<group>"; };
BC8FD8C8120E527F00F3E71A /* EventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSendingController.h; sourceTree = "<group>"; };
BC8FD8C9120E527F00F3E71A /* EventSendingController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventSendingController.cpp; sourceTree = "<group>"; };
BC8FD8CB120E52B000F3E71A /* EventSendingController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventSendingController.idl; sourceTree = "<group>"; };
BC8FD8D0120E545B00F3E71A /* JSEventSendingController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSEventSendingController.cpp; path = DerivedSources/WebKitTestRunner/JSEventSendingController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
BC8FD8D1120E545B00F3E71A /* JSEventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSEventSendingController.h; path = DerivedSources/WebKitTestRunner/JSEventSendingController.h; sourceTree = BUILT_PRODUCTS_DIR; };
+ BC9192041333E4F8003011DC /* TestInvocationCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestInvocationCG.cpp; path = cg/TestInvocationCG.cpp; sourceTree = "<group>"; };
BC952C0B11F3B965003398B4 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapper.h; sourceTree = "<group>"; };
BC952C0C11F3B965003398B4 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapper.cpp; sourceTree = "<group>"; };
BC952C0E11F3B97B003398B4 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrappable.h; sourceTree = "<group>"; };
@@ -151,7 +149,6 @@
BC7934A511906584005EA8E2 /* Cocoa.framework in Frameworks */,
BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */,
BCDA2B9A1191051F00C3BC47 /* JavaScriptCore.framework in Frameworks */,
- 65DD1D9612FFE798004B5285 /* WebCore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -162,7 +159,6 @@
BC25193E11D15D8B002EBC01 /* Cocoa.framework in Frameworks */,
BC25193F11D15D8B002EBC01 /* WebKit2.framework in Frameworks */,
BC25194011D15D8B002EBC01 /* JavaScriptCore.framework in Frameworks */,
- 65DE432512FFE84000171BCA /* WebCore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -187,6 +183,7 @@
08FB7795FE84155DC02AAC07 /* TestRunner */ = {
isa = PBXGroup;
children = (
+ BC9192021333E4CD003011DC /* cg */,
BC7933FE118F7C74005EA8E2 /* mac */,
BC251A1711D16774002EBC01 /* WebKitTestRunnerPrefix.h */,
BC7934DD119066EC005EA8E2 /* PlatformWebView.h */,
@@ -204,7 +201,6 @@
BC7934A411906584005EA8E2 /* Cocoa.framework */,
BC7934AB1190658C005EA8E2 /* WebKit2.framework */,
BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */,
- 65DD1D9512FFE798004B5285 /* WebCore.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
@@ -283,7 +279,6 @@
BC7933FF118F7C84005EA8E2 /* main.mm */,
BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */,
BC8C795B11D2785D004535A1 /* TestControllerMac.mm */,
- BC8DAD5B1315C0EC00EC96FC /* TestInvocationMac.mm */,
);
path = mac;
sourceTree = "<group>";
@@ -299,6 +294,14 @@
path = Configurations;
sourceTree = "<group>";
};
+ BC9192021333E4CD003011DC /* cg */ = {
+ isa = PBXGroup;
+ children = (
+ BC9192041333E4F8003011DC /* TestInvocationCG.cpp */,
+ );
+ name = cg;
+ sourceTree = "<group>";
+ };
BC952C0A11F3B939003398B4 /* Bindings */ = {
isa = PBXGroup;
children = (
@@ -329,6 +332,7 @@
BC99CBF11207642D00FDEE76 /* Shared */ = {
isa = PBXGroup;
children = (
+ 378D442213346D00006A777B /* config.h */,
BC99A4841208901A007E9F08 /* StringFunctions.h */,
);
name = Shared;
@@ -446,8 +450,8 @@
BC793431118F7F19005EA8E2 /* TestController.cpp in Sources */,
BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */,
BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */,
- BC8DAD5D1315C0EC00EC96FC /* TestInvocationMac.mm in Sources */,
BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */,
+ BC9192051333E4F8003011DC /* TestInvocationCG.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp b/Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp
new file mode 100644
index 0000000..88aacbd
--- /dev/null
+++ b/Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2011 Brent Fulgham <bfulgham@webkit.org>. 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 "TestInvocation.h"
+
+namespace WTR {
+
+void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image)
+{
+ // FIXME: This stub should be replaced with a Cairo implementation
+ // of the pixel dumping and comparison routines.
+}
+
+} // namespace WTR
diff --git a/Tools/WebKitTestRunner/mac/TestInvocationMac.mm b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
index 13a0295..cba2908 100644
--- a/Tools/WebKitTestRunner/mac/TestInvocationMac.mm
+++ b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
@@ -23,38 +23,41 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestInvocation.h"
#include "PlatformWebView.h"
#include "TestController.h"
#include <ImageIO/CGImageDestination.h>
-#include <LaunchServices/UTCoreTypes.h>
-#include <WebKit2/WKPage.h>
+#include <WebKit2/WKImageCG.h>
+#include <wtf/MD5.h>
#include <wtf/RetainPtr.h>
+#include <wtf/StringExtras.h>
+
+#if PLATFORM(MAC)
+#include <LaunchServices/UTCoreTypes.h>
+#endif
-#define COMMON_DIGEST_FOR_OPENSSL
-#include <CommonCrypto/CommonDigest.h>
+#if PLATFORM(WIN)
+static const CFStringRef kUTTypePNG = CFSTR("public.png");
+#endif
namespace WTR {
-static CGContextRef createCGContextFromPlatformView(PlatformWebView* platformWebView)
+static CGContextRef createCGContextFromImage(WKImageRef wkImage)
{
- WKView* view = platformWebView->platformView();
- [view display];
+ RetainPtr<CGImageRef> image(AdoptCF, WKImageCreateCGImage(wkImage));
- NSSize webViewSize = [view frame].size;
- size_t pixelsWide = static_cast<size_t>(webViewSize.width);
- size_t pixelsHigh = static_cast<size_t>(webViewSize.height);
+ size_t pixelsWide = CGImageGetWidth(image.get());
+ size_t pixelsHigh = CGImageGetHeight(image.get());
size_t rowBytes = (4 * pixelsWide + 63) & ~63;
void* buffer = calloc(pixelsHigh, rowBytes);
- CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
CGColorSpaceRelease(colorSpace);
- CGImageRef image = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [[view window] windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque);
- CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(image), CGImageGetHeight(image)), image);
- CGImageRelease(image);
+ CGContextDrawImage(context, CGRectMake(0, 0, pixelsWide, pixelsHigh), image.get());
return context;
}
@@ -67,26 +70,29 @@ void computeMD5HashStringForContext(CGContextRef bitmapContext, char hashString[
size_t bytesPerRow = CGBitmapContextGetBytesPerRow(bitmapContext);
// We need to swap the bytes to ensure consistent hashes independently of endianness
- MD5_CTX md5Context;
- MD5_Init(&md5Context);
+ MD5 md5;
unsigned char* bitmapData = static_cast<unsigned char*>(CGBitmapContextGetData(bitmapContext));
+#if PLATFORM(MAC)
if ((CGBitmapContextGetBitmapInfo(bitmapContext) & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Big) {
for (unsigned row = 0; row < pixelsHigh; row++) {
- uint32_t buffer[pixelsWide];
+ Vector<uint8_t> buffer(4 * pixelsWide);
for (unsigned column = 0; column < pixelsWide; column++)
buffer[column] = OSReadLittleInt32(bitmapData, 4 * column);
- MD5_Update(&md5Context, buffer, 4 * pixelsWide);
+ md5.addBytes(buffer);
bitmapData += bytesPerRow;
}
} else {
+#endif
for (unsigned row = 0; row < pixelsHigh; row++) {
- MD5_Update(&md5Context, bitmapData, 4 * pixelsWide);
+ md5.addBytes(bitmapData, 4 * pixelsWide);
bitmapData += bytesPerRow;
}
+#if PLATFORM(MAC)
}
+#endif
- unsigned char hash[16];
- MD5_Final(hash, &md5Context);
+ Vector<uint8_t, 16> hash;
+ md5.checksum(hash);
hashString[0] = '\0';
for (int i = 0; i < 16; i++)
@@ -120,18 +126,10 @@ static void dumpBitmap(CGContextRef bitmapContext)
}
}
-static void forceRepaintFunction(WKErrorRef, void* context)
+void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image)
{
- *static_cast<bool*>(context) = true;
-}
+ CGContextRef context = createCGContextFromImage(image);
-void TestInvocation::dumpPixelsAndCompareWithExpected()
-{
- WKPageForceRepaint(TestController::shared().mainWebView()->page(), &m_gotRepaint, forceRepaintFunction);
- TestController::shared().runUntil(m_gotRepaint, TestController::LongTimeout);
-
- CGContextRef context = createCGContextFromPlatformView(TestController::shared().mainWebView());
-
// Compute the hash of the bitmap context pixels
char actualHash[33];
computeMD5HashStringForContext(context, actualHash);
diff --git a/Tools/WebKitTestRunner/config.h b/Tools/WebKitTestRunner/config.h
new file mode 100644
index 0000000..81f8066
--- /dev/null
+++ b/Tools/WebKitTestRunner/config.h
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ */
+
+#ifndef WebKitTestRunner_config_h
+#define WebKitTestRunner_config_h
+
+#include <wtf/Platform.h>
+
+/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */
+#if USE(EXPORT_MACROS)
+
+#include <wtf/ExportMacros.h>
+
+#define WTF_EXPORT_PRIVATE WTF_IMPORT
+#define JS_EXPORT_PRIVATE WTF_IMPORT
+#define WEBKIT_EXPORTDATA WTF_IMPORT
+
+#define JS_EXPORTDATA JS_EXPORT_PRIVATE
+#define JS_EXPORTCLASS JS_EXPORT_PRIVATE
+
+#else /* !USE(EXPORT_MACROS) */
+
+#if OS(WINDOWS) && !COMPILER(GCC) && !defined(BUILDING_WX__)
+#define JS_EXPORTDATA __declspec(dllimport)
+#define WEBKIT_EXPORTDATA __declspec(dllimport)
+#else
+#define JS_EXPORTDATA
+#define WEBKIT_EXPORTDATA
+#endif
+
+#define WTF_EXPORT_PRIVATE JS_EXPORTDATA
+#define JS_EXPORT_PRIVATE JS_EXPORTDATA
+
+#endif /* USE(EXPORT_MACROS) */
+
+#if PLATFORM(WIN)
+#define WTF_USE_CF 1
+#if defined(WIN_CAIRO)
+#define WTF_PLATFORM_CAIRO 1
+#define WTF_USE_CURL 1
+#else
+#define WTF_PLATFORM_CG 1
+#define WTF_USE_CFNETWORK 1
+#endif
+#endif
+
+#endif
diff --git a/Tools/WebKitTestRunner/mac/TestControllerMac.mm b/Tools/WebKitTestRunner/mac/TestControllerMac.mm
index 8ceabc1..c884c8f 100644
--- a/Tools/WebKitTestRunner/mac/TestControllerMac.mm
+++ b/Tools/WebKitTestRunner/mac/TestControllerMac.mm
@@ -23,11 +23,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "TestController.h"
+#import "config.h"
+#import "TestController.h"
-#include "PlatformWebView.h"
-#include <WebKit2/WKStringCF.h>
-#include <mach-o/dyld.h>
+#import "PlatformWebView.h"
+#import <WebKit2/WKStringCF.h>
+#import <mach-o/dyld.h>
namespace WTR {
diff --git a/Tools/WebKitTestRunner/mac/main.mm b/Tools/WebKitTestRunner/mac/main.mm
index d2f26ab..12326a4 100644
--- a/Tools/WebKitTestRunner/mac/main.mm
+++ b/Tools/WebKitTestRunner/mac/main.mm
@@ -23,6 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#import "config.h"
+
#import "TestController.h"
int main(int argc, const char* argv[])
diff --git a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
index 18e2523..03e2c02 100644
--- a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
+++ b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
@@ -24,6 +24,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
+
#include "PlatformWebView.h"
#include "qgraphicswkview.h"
#include "qwkcontext.h"
diff --git a/Tools/WebKitTestRunner/qt/TestControllerQt.cpp b/Tools/WebKitTestRunner/qt/TestControllerQt.cpp
index 30a1b5c..bd572b0 100644
--- a/Tools/WebKitTestRunner/qt/TestControllerQt.cpp
+++ b/Tools/WebKitTestRunner/qt/TestControllerQt.cpp
@@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestController.h"
#include "WKStringQt.h"
diff --git a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
index b5fbda4..ca9d6dc 100644
--- a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
+++ b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
@@ -23,11 +23,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestInvocation.h"
namespace WTR {
-void TestInvocation::dumpPixelsAndCompareWithExpected()
+void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef)
{
}
diff --git a/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro b/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro
index d6579a4..684a14a 100644
--- a/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro
+++ b/Tools/WebKitTestRunner/qt/WebKitTestRunner.pro
@@ -9,6 +9,7 @@ GENERATED_SOURCES_DIR = ../generated
include(../../../Source/WebKit.pri)
DEFINES += USE_SYSTEM_MALLOC=1
+DEFINES -= QT_ASCII_CAST_WARNINGS
INCLUDEPATH += \
$$BASEDIR \
diff --git a/Tools/WebKitTestRunner/qt/main.cpp b/Tools/WebKitTestRunner/qt/main.cpp
index 4312a05..2061714 100644
--- a/Tools/WebKitTestRunner/qt/main.cpp
+++ b/Tools/WebKitTestRunner/qt/main.cpp
@@ -24,6 +24,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
+
#include "TestController.h"
#include <QApplication>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundle.vcproj b/Tools/WebKitTestRunner/win/InjectedBundle.vcproj
index eec770b..e1da915 100644
--- a/Tools/WebKitTestRunner/win/InjectedBundle.vcproj
+++ b/Tools/WebKitTestRunner/win/InjectedBundle.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;..\Configurations\InjectedBundleCoreFoundation.vsprops;..\Configurations\InjectedBundleCommon.vsprops"
+ InheritedPropertySheets=".\InjectedBundleDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;..\Configurations\InjectedBundleCoreFoundation.vsprops;..\Configurations\InjectedBundleCommon.vsprops"
+ InheritedPropertySheets=".\InjectedBundleRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -140,7 +140,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;..\Configurations\InjectedBundleCoreFoundation.vsprops;..\Configurations\InjectedBundleCommon.vsprops"
+ InheritedPropertySheets=".\InjectedBundleDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -201,7 +201,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;..\Configurations\InjectedBundleCFLite.vsprops;..\Configurations\InjectedBundleCommon.vsprops"
+ InheritedPropertySheets=".\InjectedBundleDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -262,7 +262,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;..\Configurations\InjectedBundleCFLite.vsprops;..\Configurations\InjectedBundleCommon.vsprops"
+ InheritedPropertySheets=".\InjectedBundleReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -321,9 +321,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="2"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;..\Configurations\InjectedBundleCoreFoundation.vsprops;..\Configurations\InjectedBundleCommon.vsprops"
+ InheritedPropertySheets=".\InjectedBundleProduction.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleDebug.vsprops b/Tools/WebKitTestRunner/win/InjectedBundleDebug.vsprops
new file mode 100644
index 0000000..06623be
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/InjectedBundleDebug.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleDebug"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ ..\Configurations\InjectedBundleCoreFoundation.vsprops;
+ ..\Configurations\InjectedBundleCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleDebugAll.vsprops b/Tools/WebKitTestRunner/win/InjectedBundleDebugAll.vsprops
new file mode 100644
index 0000000..a084312
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/InjectedBundleDebugAll.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleDebugAll"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;
+ ..\Configurations\InjectedBundleCoreFoundation.vsprops;
+ ..\Configurations\InjectedBundleCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleDebugCairoCFLite.vsprops b/Tools/WebKitTestRunner/win/InjectedBundleDebugCairoCFLite.vsprops
new file mode 100644
index 0000000..77fc82d
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/InjectedBundleDebugCairoCFLite.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleDebugCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;
+ ..\Configurations\InjectedBundleCFLite.vsprops;
+ ..\Configurations\InjectedBundleCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj b/Tools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj
index 83c3868..c74fd3e 100755
--- a/Tools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj
+++ b/Tools/WebKitTestRunner/win/InjectedBundleGenerated.vcproj
@@ -43,7 +43,7 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="0"
InheritedPropertySheets=".\InjectedBundleGeneratedCommon.vsprops"
>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleProduction.vsprops b/Tools/WebKitTestRunner/win/InjectedBundleProduction.vsprops
new file mode 100644
index 0000000..b036c84
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/InjectedBundleProduction.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleProduction"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ ..\Configurations\InjectedBundleCoreFoundation.vsprops;
+ ..\Configurations\InjectedBundleCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleRelease.vsprops b/Tools/WebKitTestRunner/win/InjectedBundleRelease.vsprops
new file mode 100644
index 0000000..8f65ff3
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/InjectedBundleRelease.vsprops
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleRelease"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ ..\Configurations\InjectedBundleCoreFoundation.vsprops;
+ ..\Configurations\InjectedBundleCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/InjectedBundleReleaseCairoCFLite.vsprops b/Tools/WebKitTestRunner/win/InjectedBundleReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..c7dfb84
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/InjectedBundleReleaseCairoCFLite.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="InjectedBundleReleaseCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ ..\Configurations\InjectedBundleCFLite.vsprops;
+ ..\Configurations\InjectedBundleCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
index e75ccc8..9e23d70 100644
--- a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
+++ b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "PlatformWebView.h"
namespace WTR {
diff --git a/Tools/WebKitTestRunner/win/TestControllerWin.cpp b/Tools/WebKitTestRunner/win/TestControllerWin.cpp
index 6201cf7..44a6138 100644
--- a/Tools/WebKitTestRunner/win/TestControllerWin.cpp
+++ b/Tools/WebKitTestRunner/win/TestControllerWin.cpp
@@ -23,6 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestController.h"
#include <fcntl.h>
diff --git a/Tools/WebKitTestRunner/win/TestInvocationWin.cpp b/Tools/WebKitTestRunner/win/TestInvocationWin.cpp
index b5fbda4..7c79ff5 100644
--- a/Tools/WebKitTestRunner/win/TestInvocationWin.cpp
+++ b/Tools/WebKitTestRunner/win/TestInvocationWin.cpp
@@ -23,12 +23,15 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
#include "TestInvocation.h"
namespace WTR {
-void TestInvocation::dumpPixelsAndCompareWithExpected()
+#if !PLATFORM(CG)
+void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef)
{
}
+#endif
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunner.vcproj b/Tools/WebKitTestRunner/win/WebKitTestRunner.vcproj
index e12338a..bb4b4c6 100644
--- a/Tools/WebKitTestRunner/win/WebKitTestRunner.vcproj
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunner.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;..\Configurations\WebKitTestRunnerCommon.vsprops;..\Configurations\WebKitTestRunnerCoreFoundation.vsprops"
+ InheritedPropertySheets=".\WebKitTestRunnerDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;..\Configurations\WebKitTestRunnerCommon.vsprops;..\Configurations\WebKitTestRunnerCoreFoundation.vsprops"
+ InheritedPropertySheets=".\WebKitTestRunnerRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -140,7 +140,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;..\Configurations\WebKitTestRunnerCommon.vsprops;..\Configurations\WebKitTestRunnerCoreFoundation.vsprops"
+ InheritedPropertySheets=".\WebKitTestRunnerDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -201,7 +201,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;..\Configurations\WebKitTestRunnerCommon.vsprops;..\Configurations\WebKitTestRunnerCFLite.vsprops"
+ InheritedPropertySheets=".\WebKitTestRunnerDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -262,7 +262,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;..\Configurations\WebKitTestRunnerCommon.vsprops;..\Configurations\WebKitTestRunnerCFLite.vsprops"
+ InheritedPropertySheets=".\WebKitTestRunnerReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -321,9 +321,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;..\Configurations\WebKitTestRunnerCommon.vsprops;..\Configurations\WebKitTestRunnerCoreFoundation.vsprops"
+ InheritedPropertySheets=".\WebKitTestRunnerProduction.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -406,6 +406,70 @@
>
</File>
</Filter>
+ <Filter
+ Name="cg"
+ >
+ <File
+ RelativePath="..\cg\TestInvocationCG.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>
+ </Filter>
+ <Filter
+ Name="cairo"
+ >
+ <File
+ RelativePath="..\cairo\TestInvocationCairo.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>
+ </Filter>
<File
RelativePath="..\PlatformWebView.h"
>
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerDebug.vsprops b/Tools/WebKitTestRunner/win/WebKitTestRunnerDebug.vsprops
new file mode 100644
index 0000000..bf12fe2
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerDebug.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitTestRunnerDebug"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ ..\Configurations\WebKitTestRunnerCommon.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreFoundation.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreGraphics.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerDebugAll.vsprops b/Tools/WebKitTestRunner/win/WebKitTestRunnerDebugAll.vsprops
new file mode 100644
index 0000000..1629640
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerDebugAll.vsprops
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitTestRunnerDebugAll"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;
+ ..\Configurations\WebKitTestRunnerCommon.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreFoundation.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreGraphics.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerDebugCairoCFLite.vsprops b/Tools/WebKitTestRunner/win/WebKitTestRunnerDebugCairoCFLite.vsprops
new file mode 100644
index 0000000..0e18af6
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerDebugCairoCFLite.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitTestRunnerDebugCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;
+ ..\Configurations\WebKitTestRunnerCommon.vsprops;
+ ..\Configurations\WebKitTestRunnerCFLite.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerProduction.vsprops b/Tools/WebKitTestRunner/win/WebKitTestRunnerProduction.vsprops
new file mode 100644
index 0000000..28dbf04
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerProduction.vsprops
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitTestRunnerProduction"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ ..\Configurations\WebKitTestRunnerCommon.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreFoundation.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreGraphics.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerRelease.vsprops b/Tools/WebKitTestRunner/win/WebKitTestRunnerRelease.vsprops
new file mode 100644
index 0000000..788f4ef
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerRelease.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitTestRunnerRelease"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ ..\Configurations\WebKitTestRunnerCommon.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreFoundation.vsprops;
+ ..\Configurations\WebKitTestRunnerCoreGraphics.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/WebKitTestRunnerReleaseCairoCFLite.vsprops b/Tools/WebKitTestRunner/win/WebKitTestRunnerReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..f6e0f00
--- /dev/null
+++ b/Tools/WebKitTestRunner/win/WebKitTestRunnerReleaseCairoCFLite.vsprops
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="WebKitTestRunnerReleaseCairoCFLite"
+ InheritedPropertySheets="
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ ..\Configurations\WebKitTestRunnerCommon.vsprops;
+ ..\Configurations\WebKitTestRunnerCFLite.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WebKitTestRunner/win/main.cpp b/Tools/WebKitTestRunner/win/main.cpp
index 6ef0f66..14c25dc 100644
--- a/Tools/WebKitTestRunner/win/main.cpp
+++ b/Tools/WebKitTestRunner/win/main.cpp
@@ -23,6 +23,8 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "config.h"
+
#include "TestController.h"
int main(int argc, const char* argv[])
diff --git a/Tools/WinLauncher/WinLauncher.vcproj b/Tools/WinLauncher/WinLauncher.vcproj
index 2f23abe..e2ef8f7 100644
--- a/Tools/WinLauncher/WinLauncher.vcproj
+++ b/Tools/WinLauncher/WinLauncher.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\WinLauncherCommon.vsprops"
+ InheritedPropertySheets=".\WinLauncherDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -79,7 +79,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WinLauncherCommon.vsprops"
+ InheritedPropertySheets=".\WinLauncherRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -140,7 +140,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\WinLauncherDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -201,7 +201,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\WinLauncherDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -260,9 +260,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WinLauncherCommon.vsprops"
+ InheritedPropertySheets=".\WinLauncherProduction.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -324,7 +324,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\WinLauncherCommon.vsprops"
+ InheritedPropertySheets=".\WinLauncherReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -431,7 +431,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
>
<Tool
Name="VCCLCompilerTool"
diff --git a/Tools/WinLauncher/WinLauncherDebug.vsprops b/Tools/WinLauncher/WinLauncherDebug.vsprops
new file mode 100644
index 0000000..405f4c3
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncherDebug.vsprops
@@ -0,0 +1,11 @@
+<?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
new file mode 100644
index 0000000..34edf31
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncherDebugAll.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..75678e3
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncherDebugCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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/WinLauncherProduction.vsprops b/Tools/WinLauncher/WinLauncherProduction.vsprops
new file mode 100644
index 0000000..83292fe
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncherProduction.vsprops
@@ -0,0 +1,12 @@
+<?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\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;
+ .\WinLauncherCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherRelease.vsprops b/Tools/WinLauncher/WinLauncherRelease.vsprops
new file mode 100644
index 0000000..2b41482
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncherRelease.vsprops
@@ -0,0 +1,11 @@
+<?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\release.vsprops;
+ .\WinLauncherCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops b/Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops
new file mode 100644
index 0000000..351ac49
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\WinLauncherCommon.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/record-memory-win/record-memory-win.vcproj b/Tools/record-memory-win/record-memory-win.vcproj
index 4fd6b53..5c1669e 100644
--- a/Tools/record-memory-win/record-memory-win.vcproj
+++ b/Tools/record-memory-win/record-memory-win.vcproj
@@ -18,7 +18,7 @@
<Configuration
Name="Release|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\record-memory-win-common.vsprops"
+ InheritedPropertySheets=".\record-memory-winRelease.vsprops"
CharacterSet="1"
>
<Tool
@@ -77,9 +77,9 @@
/>
</Configuration>
<Configuration
- Name="Release_LTCG|Win32"
+ Name="Production|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\record-memory-win-common.vsprops"
+ InheritedPropertySheets=".\record-memory-winProduction.vsprops"
CharacterSet="1"
WholeProgramOptimization="1"
>
@@ -141,7 +141,7 @@
<Configuration
Name="Debug|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\record-memory-win-common.vsprops"
+ InheritedPropertySheets=".\record-memory-winDebug.vsprops"
CharacterSet="1"
>
<Tool
@@ -202,7 +202,7 @@
<Configuration
Name="Debug_All|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\record-memory-winDebugAll.vsprops"
CharacterSet="1"
>
<Tool
@@ -263,7 +263,7 @@
<Configuration
Name="Release_Cairo_CFLite|Win32"
ConfigurationType="1"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\record-memory-win-common.vsprops"
+ InheritedPropertySheets=".\record-memory-winReleaseCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
@@ -324,7 +324,7 @@
<Configuration
Name="Debug_Cairo_CFLite|Win32"
ConfigurationType="1"
- 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"
+ InheritedPropertySheets=".\record-memory-winDebugCairoCFLite.vsprops"
CharacterSet="1"
>
<Tool
diff --git a/Tools/record-memory-win/record-memory-winDebug.vsprops b/Tools/record-memory-win/record-memory-winDebug.vsprops
new file mode 100644
index 0000000..1801323
--- /dev/null
+++ b/Tools/record-memory-win/record-memory-winDebug.vsprops
@@ -0,0 +1,11 @@
+<?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
new file mode 100644
index 0000000..2d6036f
--- /dev/null
+++ b/Tools/record-memory-win/record-memory-winDebugAll.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..c2dd15a
--- /dev/null
+++ b/Tools/record-memory-win/record-memory-winDebugCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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
new file mode 100644
index 0000000..4eb90f4
--- /dev/null
+++ b/Tools/record-memory-win/record-memory-winProduction.vsprops
@@ -0,0 +1,12 @@
+<?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\release.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
new file mode 100644
index 0000000..f38d7d7
--- /dev/null
+++ b/Tools/record-memory-win/record-memory-winRelease.vsprops
@@ -0,0 +1,11 @@
+<?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\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
new file mode 100644
index 0000000..8ce466f
--- /dev/null
+++ b/Tools/record-memory-win/record-memory-winReleaseCairoCFLite.vsprops
@@ -0,0 +1,12 @@
+<?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\release.vsprops;
+ $(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;
+ .\record-memory-win-common.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/Tools/wx/build/settings.py b/Tools/wx/build/settings.py
index 2b757c4..6d7a7a5 100644
--- a/Tools/wx/build/settings.py
+++ b/Tools/wx/build/settings.py
@@ -186,7 +186,7 @@ os.environ['CREATE_HASH_TABLE'] = create_hash_table
feature_defines = ['ENABLE_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER',
'ENABLE_SVG', 'ENABLE_SVG_USE', 'ENABLE_FILTERS', 'ENABLE_SVG_FONTS',
'ENABLE_SVG_ANIMATION', 'ENABLE_SVG_AS_IMAGE', 'ENABLE_SVG_FOREIGN_OBJECT',
- 'ENABLE_JIT', 'BUILDING_%s' % build_port.upper()]
+ 'ENABLE_DOM_STORAGE', 'BUILDING_%s' % build_port.upper()]
msvc_version = 'msvc2008'
@@ -230,20 +230,8 @@ def common_configure(conf):
print "ERROR: You must use the Win32 Python from python.org, not Cygwin Python, when building on Windows."
sys.exit(1)
- if sys.platform.startswith('darwin') and build_port == 'wx':
- import platform
- if platform.release().startswith('10'): # Snow Leopard
- # wx currently only supports 32-bit compilation, so we want gcc-4.0 instead of 4.2 on Snow Leopard
- # unless the user has explicitly set a different compiler.
- if not "CC" in os.environ:
- conf.env['CC'] = 'gcc-4.0'
- if not "CXX" in os.environ:
- conf.env['CXX'] = 'g++-4.0'
conf.check_tool('compiler_cxx')
conf.check_tool('compiler_cc')
- if Options.options.wxpython:
- conf.check_tool('python')
- conf.check_python_headers()
if sys.platform.startswith('darwin'):
conf.check_tool('osx')
@@ -324,8 +312,6 @@ def common_configure(conf):
if min_version in ['10.1','10.2','10.3']:
min_version = '10.4'
- os.environ[mac_target] = conf.env[mac_target] = min_version
-
sdk_version = min_version
if min_version == "10.4":
sdk_version += "u"
@@ -341,10 +327,22 @@ def common_configure(conf):
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')
diff --git a/Tools/wx/build/waf_extensions.py b/Tools/wx/build/waf_extensions.py
index f50f264..4105bb1 100644
--- a/Tools/wx/build/waf_extensions.py
+++ b/Tools/wx/build/waf_extensions.py
@@ -40,10 +40,25 @@ def exec_command(s, **kw):
if i.find(" ") != -1:
i = '"%s"' % i
t.append(i)
- os.write(fd, ' '.join(t[1:]))
+
+ 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], '@' + filename]
+ s = [s[0]]
+ s.append(filename_str)
+ if filename2_str:
+ s.append(filename2_str)
if 'log' in kw:
kw['stdout'] = kw['stderr'] = kw['log']