From 2bde8e466a4451c7319e3a072d118917957d6554 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 25 May 2011 19:08:45 +0100 Subject: Merge WebKit at r82507: Initial merge by git Change-Id: I60ce9d780725b58b45e54165733a8ffee23b683e --- .../build.webkit.org-config/config.json | 10 +- .../build.webkit.org-config/master.cfg | 6 +- .../public_html/LeaksViewer/LeaksLoader.js | 65 + .../public_html/LeaksViewer/LeaksParser.js | 40 + .../public_html/LeaksViewer/LeaksParserWorker.js | 101 + .../public_html/LeaksViewer/LeaksViewer.css | 91 + .../public_html/LeaksViewer/LeaksViewer.js | 202 ++ .../public_html/LeaksViewer/RecentBuildsLoader.js | 80 + .../public_html/LeaksViewer/Utilities.js | 42 + .../public_html/LeaksViewer/WebInspectorShims.js | 67 + .../public_html/LeaksViewer/index.html | 80 + .../build.webkit.org-config/templates/root.html | 1 + Tools/BuildSlaveSupport/test-result-archive | 6 +- Tools/BuildSlaveSupport/win/kill-old-processes | 2 +- Tools/ChangeLog | 2711 ++++++++++++++++++++ Tools/DumpRenderTree/DumpRenderTree.sln | 18 +- .../DumpRenderTree.xcodeproj/project.pbxproj | 12 + .../ForwardingHeaders/wtf/OwnArrayPtr.h | 1 + .../ForwardingHeaders/wtf/ThreadSafeRefCounted.h | 1 + .../ForwardingHeaders/wtf/ThreadSafeShared.h | 1 - Tools/DumpRenderTree/LayoutTestController.cpp | 133 +- Tools/DumpRenderTree/LayoutTestController.h | 11 + Tools/DumpRenderTree/StorageTrackerDelegate.h | 37 + Tools/DumpRenderTree/StorageTrackerDelegate.mm | 82 + .../TestNetscapePlugIn/PluginTest.cpp | 16 + .../DumpRenderTree/TestNetscapePlugIn/PluginTest.h | 4 + .../Tests/NPDeallocateCalledBeforeNPShutdown.cpp | 102 + .../TestNetscapePlugIn/mac/Info.plist | 11 +- Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp | 3 +- .../TestNetscapePlugIn/win/TestNetscapePlugin.rc | 6 +- .../win/TestNetscapePlugin.vcproj | 18 +- .../win/TestNetscapePluginDebug.vsprops | 11 + .../win/TestNetscapePluginDebugAll.vsprops | 12 + .../win/TestNetscapePluginDebugCairoCFLite.vsprops | 12 + .../win/TestNetscapePluginProduction.vsprops | 12 + .../win/TestNetscapePluginRelease.vsprops | 11 + .../TestNetscapePluginReleaseCairoCFLite.vsprops | 12 + Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp | 9 +- Tools/DumpRenderTree/cg/ImageDiffCG.cpp | 4 + Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp | 5 - Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h | 1 - Tools/DumpRenderTree/chromium/DumpRenderTree.cpp | 14 +- Tools/DumpRenderTree/chromium/EventSender.cpp | 4 +- .../chromium/LayoutTestController.cpp | 134 +- .../DumpRenderTree/chromium/LayoutTestController.h | 33 +- Tools/DumpRenderTree/chromium/TestShell.cpp | 21 +- Tools/DumpRenderTree/chromium/TestShell.h | 6 + Tools/DumpRenderTree/chromium/TestShellWin.cpp | 51 +- Tools/DumpRenderTree/chromium/WebPreferences.cpp | 2 + Tools/DumpRenderTree/chromium/WebPreferences.h | 1 + Tools/DumpRenderTree/chromium/WebViewHost.cpp | 6 + Tools/DumpRenderTree/chromium/WebViewHost.h | 13 +- Tools/DumpRenderTree/chromium/config.h | 3 + Tools/DumpRenderTree/config.h | 31 +- .../DumpRenderTree/gtk/AccessibilityCallbacks.cpp | 3 + Tools/DumpRenderTree/gtk/DumpRenderTree.cpp | 49 +- .../DumpRenderTree/gtk/LayoutTestControllerGtk.cpp | 68 +- .../mac/Configurations/Base.xcconfig | 6 +- Tools/DumpRenderTree/mac/DumpRenderTree.mm | 9 + Tools/DumpRenderTree/mac/DumpRenderTreeMac.h | 3 + .../DumpRenderTree/mac/LayoutTestControllerMac.mm | 89 +- Tools/DumpRenderTree/mac/PerlSupport/Makefile | 2 +- Tools/DumpRenderTree/mac/UIDelegate.h | 1 + Tools/DumpRenderTree/mac/UIDelegate.mm | 10 +- .../DumpRenderTree/mac/WebArchiveDumpSupportMac.mm | 1 + Tools/DumpRenderTree/qt/DumpRenderTree.pro | 2 + Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp | 24 +- Tools/DumpRenderTree/qt/DumpRenderTreeQt.h | 6 +- Tools/DumpRenderTree/qt/GCControllerQt.cpp | 2 +- Tools/DumpRenderTree/qt/ImageDiff.pro | 1 + Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp | 51 +- Tools/DumpRenderTree/qt/LayoutTestControllerQt.h | 11 +- Tools/DumpRenderTree/qt/PlainTextControllerQt.cpp | 2 +- .../qt/TestNetscapePlugin/TestNetscapePlugin.pro | 3 + Tools/DumpRenderTree/qt/TextInputControllerQt.cpp | 2 +- Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp | 13 + Tools/DumpRenderTree/qt/WorkQueueItemQt.h | 18 + Tools/DumpRenderTree/qt/main.cpp | 89 +- Tools/DumpRenderTree/win/DumpRenderTree.vcproj | 18 +- .../DumpRenderTree/win/DumpRenderTreeDebug.vsprops | 13 + .../win/DumpRenderTreeDebugAll.vsprops | 14 + .../win/DumpRenderTreeDebugCairoCFLite.vsprops | 9 + .../win/DumpRenderTreeProduction.vsprops | 14 + .../win/DumpRenderTreeRelease.vsprops | 13 + .../win/DumpRenderTreeReleaseCairoCFLite.vsprops | 16 + Tools/DumpRenderTree/win/ImageDiff.vcproj | 14 +- Tools/DumpRenderTree/win/ImageDiffDebug.vsprops | 11 + Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops | 12 + .../win/ImageDiffDebugCairoCFLite.vsprops | 12 + .../DumpRenderTree/win/ImageDiffProduction.vsprops | 12 + Tools/DumpRenderTree/win/ImageDiffRelease.vsprops | 11 + .../win/ImageDiffReleaseCairoCFLite.vsprops | 12 + .../DumpRenderTree/win/LayoutTestControllerWin.cpp | 76 +- Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp | 59 +- Tools/EWebLauncher/main.c | 2 +- Tools/FindSafari/FindSafari.vcproj | 16 +- Tools/FindSafari/FindSafariDebug.vsprops | 11 + Tools/FindSafari/FindSafariDebugAll.vsprops | 11 + .../FindSafari/FindSafariDebugCairoCFLite.vsprops | 12 + Tools/FindSafari/FindSafariProduction.vsprops | 12 + Tools/FindSafari/FindSafariRelease.vsprops | 11 + .../FindSafariReleaseCairoCFLite.vsprops | 12 + Tools/FindSafari/FindSafariReleasePGO.vsprops | 12 + Tools/GNUmakefile.am | 1 + Tools/MiniBrowser/Configurations/Base.xcconfig | 13 +- .../Configurations/MiniBrowserDebug.vsprops | 12 + .../Configurations/MiniBrowserDebugAll.vsprops | 13 + .../MiniBrowserDebugCairoCFLite.vsprops | 13 + .../Configurations/MiniBrowserProduction.vsprops | 13 + .../Configurations/MiniBrowserRelease.vsprops | 12 + .../MiniBrowserReleaseCairoCFLite.vsprops | 13 + Tools/MiniBrowser/MiniBrowser.vcproj | 16 +- .../MiniBrowser.xcodeproj/project.pbxproj | 8 +- Tools/MiniBrowser/mac/BrowserWindowController.m | 1 + Tools/MiniBrowser/qt/BrowserWindow.cpp | 9 + Tools/MiniBrowser/qt/BrowserWindow.h | 2 + Tools/MiniBrowser/qt/MiniBrowser.pro | 2 + Tools/MiniBrowser/qt/MiniBrowserApplication.cpp | 4 + Tools/MiniBrowser/qt/MiniBrowserApplication.h | 2 + Tools/QtTestBrowser/QtTestBrowser.pro | 8 + Tools/QtTestBrowser/QtTestBrowser.qrc | 1 + Tools/QtTestBrowser/favicon.png | Bin 0 -> 891 bytes Tools/QtTestBrowser/launcherwindow.cpp | 15 +- Tools/QtTestBrowser/launcherwindow.h | 12 +- Tools/QtTestBrowser/locationedit.cpp | 48 + Tools/QtTestBrowser/locationedit.h | 6 + Tools/QtTestBrowser/main.cpp | 81 + Tools/QtTestBrowser/mainwindow.cpp | 27 +- Tools/QtTestBrowser/mainwindow.h | 3 + Tools/Scripts/build-jsc | 8 +- Tools/Scripts/build-webkit | 74 +- Tools/Scripts/check-inspector-strings | 14 +- Tools/Scripts/do-webcore-rename | 2 - Tools/Scripts/extract-localizable-strings | 14 +- Tools/Scripts/generate-project-files | 38 + Tools/Scripts/new-run-webkit-httpd | 6 +- Tools/Scripts/old-run-webkit-tests | 36 +- Tools/Scripts/read-checksum-from-png | 39 + Tools/Scripts/run-gtk-tests | 15 +- Tools/Scripts/show-pretty-diff | 77 + Tools/Scripts/update-webkit | 8 + Tools/Scripts/update-webkit-localizable-strings | 15 +- Tools/Scripts/webkitdirs.pm | 258 +- Tools/Scripts/webkitpy/common/checkout/api.py | 6 +- .../Scripts/webkitpy/common/checkout/changelog.py | 4 +- Tools/Scripts/webkitpy/common/checkout/scm.py | 22 +- Tools/Scripts/webkitpy/common/config/build.py | 20 +- .../webkitpy/common/config/build_unittest.py | 7 +- Tools/Scripts/webkitpy/common/config/committers.py | 9 +- Tools/Scripts/webkitpy/common/config/ports.py | 25 +- .../webkitpy/common/net/bugzilla/__init__.py | 2 +- .../webkitpy/common/net/bugzilla/bugzilla.py | 24 +- .../common/net/bugzilla/bugzilla_unittest.py | 29 +- .../webkitpy/common/net/buildbot/buildbot.py | 20 +- .../common/net/buildbot/buildbot_unittest.py | 59 +- .../Scripts/webkitpy/common/system/autoinstall.py | 4 +- Tools/Scripts/webkitpy/common/system/filesystem.py | 3 + .../webkitpy/common/system/filesystem_mock.py | 30 + .../layout_package/dump_render_tree_thread.py | 2 +- .../layout_package/single_test_runner.py | 114 +- .../layout_tests/layout_package/test_failures.py | 77 +- .../layout_package/test_result_writer.py | 23 +- .../layout_tests/layout_package/test_runner.py | 5 - .../layout_tests/layout_package/test_runner2.py | 2 +- Tools/Scripts/webkitpy/layout_tests/port/base.py | 47 +- .../webkitpy/layout_tests/port/chromium_linux.py | 5 - .../webkitpy/layout_tests/port/chromium_mac.py | 40 +- .../webkitpy/layout_tests/port/chromium_win.py | 4 + Tools/Scripts/webkitpy/layout_tests/port/dryrun.py | 20 +- .../webkitpy/layout_tests/port/http_server.py | 13 +- Tools/Scripts/webkitpy/layout_tests/port/mac.py | 4 +- .../layout_tests/port/mock_drt_unittest.py | 3 + .../webkitpy/layout_tests/port/port_testcase.py | 2 +- Tools/Scripts/webkitpy/layout_tests/port/test.py | 36 +- .../webkitpy/layout_tests/port/test_files.py | 5 +- .../layout_tests/read_checksum_from_png.py | 40 + .../read_checksum_from_png_unittest.py | 44 + .../rebaseline_chromium_webkit_tests.py | 271 +- .../rebaseline_chromium_webkit_tests_unittest.py | 14 + .../layout_tests/run_webkit_tests_unittest.py | 77 +- Tools/Scripts/webkitpy/style/checker.py | 21 +- Tools/Scripts/webkitpy/style/checker_unittest.py | 31 +- Tools/Scripts/webkitpy/style/checkers/changelog.py | 74 + .../webkitpy/style/checkers/changelog_unittest.py | 155 ++ Tools/Scripts/webkitpy/style/error_handlers.py | 10 +- Tools/Scripts/webkitpy/test/cat.py | 2 +- Tools/Scripts/webkitpy/test/echo.py | 2 +- Tools/Scripts/webkitpy/thirdparty/__init__.py | 2 +- Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py | 13 +- .../webkitpy/tool/commands/queues_unittest.py | 2 - Tools/Scripts/webkitpy/tool/commands/upload.py | 21 +- .../webkitpy/tool/commands/upload_unittest.py | 19 + Tools/Scripts/webkitpy/tool/steps/__init__.py | 1 + Tools/Scripts/webkitpy/tool/steps/abstractstep.py | 2 +- Tools/Scripts/webkitpy/tool/steps/attachtobug.py | 51 + Tools/Scripts/webkitpy/tool/steps/commit.py | 2 +- Tools/Scripts/webkitpy/tool/steps/options.py | 2 +- .../webkitpy/tool/steps/preparechangelog.py | 2 +- .../TestResultServer/handlers/dashboardhandler.py | 10 +- Tools/TestWebKitAPI/Configurations/Base.xcconfig | 13 +- .../Configurations/InjectedBundle.xcconfig | 3 +- .../Configurations/TestWebKitAPICFNetwork.vsprops | 11 + .../Configurations/TestWebKitAPIDebug.vsprops | 2 +- .../Configurations/TestWebKitAPIDebugAll.vsprops | 2 +- .../TestWebKitAPIDebugCairoCFLite.vsprops | 2 +- .../Configurations/TestWebKitAPIRelease.vsprops | 2 +- Tools/TestWebKitAPI/PlatformUtilities.h | 1 + .../TestWebKitAPI.xcodeproj/project.pbxproj | 20 + Tools/TestWebKitAPI/TestWebKitAPIPrefix.h | 4 + .../TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp | 60 + .../Tests/WebKit2/CanHandleRequest.cpp | 72 + .../Tests/WebKit2/CanHandleRequest_Bundle.cpp | 66 + .../TestWebKitAPI/Tests/WebKit2/CookieManager.cpp | 88 + ...ndingMessagesToTheWebProcessBeforeItIsValid.cpp | 42 + .../WebKit2/win/DoNotCopyANullCFURLResponse.cpp | 41 + Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm | 8 + Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp | 14 + Tools/TestWebKitAPI/win/TestWebKitAPI.sln | 14 +- Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj | 42 +- .../win/TestWebKitAPIGenerated.vcproj | 2 +- .../win/TestWebKitAPIInjectedBundle.vcproj | 6 +- Tools/WebKitAPITest/HostWindow.cpp | 1 + Tools/WebKitAPITest/TestsController.cpp | 1 + Tools/WebKitAPITest/WebKitAPITest.vcproj | 14 +- Tools/WebKitAPITest/WebKitAPITestDebug.vsprops | 11 + Tools/WebKitAPITest/WebKitAPITestDebugAll.vsprops | 12 + .../WebKitAPITestDebugCairoCFLite.vsprops | 12 + .../WebKitAPITest/WebKitAPITestProduction.vsprops | 12 + Tools/WebKitAPITest/WebKitAPITestRelease.vsprops | 11 + .../WebKitAPITestReleaseCairoCFLite.vsprops | 12 + Tools/WebKitAPITest/config.h | 57 + Tools/WebKitAPITest/main.cpp | 2 + Tools/WebKitAPITest/tests/WebViewDestruction.cpp | 2 + Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj | 14 +- .../WebKitLauncherWinDebug.vsprops | 11 + .../WebKitLauncherWinDebugAll.vsprops | 12 + .../WebKitLauncherWinDebugCairoCFLite.vsprops | 12 + .../WebKitLauncherWinProduction.vsprops | 12 + .../WebKitLauncherWinRelease.vsprops | 11 + .../WebKitLauncherWinReleaseCairoCFLite.vsprops | 12 + .../WebKitTestRunner/Configurations/Base.xcconfig | 13 +- .../Configurations/InjectedBundle.xcconfig | 2 +- .../WebKitTestRunnerCoreGraphics.vsprops | 11 + .../InjectedBundle/Bindings/JSWrapper.cpp | 1 + .../InjectedBundle/EventSendingController.cpp | 1 + .../InjectedBundle/GCController.cpp | 1 + .../InjectedBundle/InjectedBundle.cpp | 14 +- .../InjectedBundle/InjectedBundle.h | 8 + .../InjectedBundle/InjectedBundleMain.cpp | 2 + .../InjectedBundle/InjectedBundlePage.cpp | 30 +- .../InjectedBundle/LayoutTestController.cpp | 6 + .../InjectedBundle/LayoutTestController.h | 1 + .../InjectedBundle/qt/ActivateFontsQt.cpp | 14 +- .../InjectedBundle/qt/InjectedBundleQt.cpp | 1 + .../InjectedBundle/qt/LayoutTestControllerQt.cpp | 1 + .../InjectedBundle/win/ActivateFonts.cpp | 1 + .../InjectedBundle/win/InjectedBundleWin.cpp | 1 + .../InjectedBundle/win/LayoutTestControllerWin.cpp | 1 + Tools/WebKitTestRunner/StringFunctions.h | 20 +- Tools/WebKitTestRunner/TestController.cpp | 5 + Tools/WebKitTestRunner/TestInvocation.cpp | 17 +- Tools/WebKitTestRunner/TestInvocation.h | 2 +- Tools/WebKitTestRunner/WebKitTestRunner.sln | 26 +- .../WebKitTestRunner.xcodeproj/project.pbxproj | 24 +- .../WebKitTestRunner/cairo/TestInvocationCairo.cpp | 38 + Tools/WebKitTestRunner/cg/TestInvocationCG.cpp | 154 ++ Tools/WebKitTestRunner/config.h | 68 + Tools/WebKitTestRunner/mac/TestControllerMac.mm | 9 +- Tools/WebKitTestRunner/mac/TestInvocationMac.mm | 156 -- Tools/WebKitTestRunner/mac/main.mm | 2 + Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp | 2 + Tools/WebKitTestRunner/qt/TestControllerQt.cpp | 1 + Tools/WebKitTestRunner/qt/TestInvocationQt.cpp | 3 +- Tools/WebKitTestRunner/qt/WebKitTestRunner.pro | 1 + Tools/WebKitTestRunner/qt/main.cpp | 2 + Tools/WebKitTestRunner/win/InjectedBundle.vcproj | 14 +- .../win/InjectedBundleDebug.vsprops | 12 + .../win/InjectedBundleDebugAll.vsprops | 13 + .../win/InjectedBundleDebugCairoCFLite.vsprops | 13 + .../win/InjectedBundleGenerated.vcproj | 2 +- .../win/InjectedBundleProduction.vsprops | 13 + .../win/InjectedBundleRelease.vsprops | 12 + .../win/InjectedBundleReleaseCairoCFLite.vsprops | 13 + Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp | 1 + Tools/WebKitTestRunner/win/TestControllerWin.cpp | 1 + Tools/WebKitTestRunner/win/TestInvocationWin.cpp | 5 +- Tools/WebKitTestRunner/win/WebKitTestRunner.vcproj | 78 +- .../win/WebKitTestRunnerDebug.vsprops | 13 + .../win/WebKitTestRunnerDebugAll.vsprops | 14 + .../win/WebKitTestRunnerDebugCairoCFLite.vsprops | 13 + .../win/WebKitTestRunnerProduction.vsprops | 14 + .../win/WebKitTestRunnerRelease.vsprops | 13 + .../win/WebKitTestRunnerReleaseCairoCFLite.vsprops | 13 + Tools/WebKitTestRunner/win/main.cpp | 2 + Tools/WinLauncher/WinLauncher.vcproj | 16 +- Tools/WinLauncher/WinLauncherDebug.vsprops | 11 + Tools/WinLauncher/WinLauncherDebugAll.vsprops | 12 + .../WinLauncherDebugCairoCFLite.vsprops | 12 + Tools/WinLauncher/WinLauncherProduction.vsprops | 12 + Tools/WinLauncher/WinLauncherRelease.vsprops | 11 + .../WinLauncherReleaseCairoCFLite.vsprops | 12 + Tools/record-memory-win/record-memory-win.vcproj | 14 +- .../record-memory-winDebug.vsprops | 11 + .../record-memory-winDebugAll.vsprops | 12 + .../record-memory-winDebugCairoCFLite.vsprops | 12 + .../record-memory-winProduction.vsprops | 12 + .../record-memory-winRelease.vsprops | 11 + .../record-memory-winReleaseCairoCFLite.vsprops | 12 + Tools/wx/build/settings.py | 30 +- Tools/wx/build/waf_extensions.py | 19 +- 310 files changed, 8548 insertions(+), 1036 deletions(-) create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksLoader.js create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParser.js create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksParserWorker.js create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.css create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/RecentBuildsLoader.js create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/Utilities.js create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js create mode 100644 Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/index.html create mode 100644 Tools/DumpRenderTree/ForwardingHeaders/wtf/OwnArrayPtr.h create mode 100644 Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeRefCounted.h delete mode 100644 Tools/DumpRenderTree/ForwardingHeaders/wtf/ThreadSafeShared.h create mode 100644 Tools/DumpRenderTree/StorageTrackerDelegate.h create mode 100644 Tools/DumpRenderTree/StorageTrackerDelegate.mm create mode 100644 Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp create mode 100644 Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops create mode 100644 Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops create mode 100644 Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops create mode 100644 Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops create mode 100644 Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops create mode 100644 Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops create mode 100644 Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops create mode 100644 Tools/DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops create mode 100644 Tools/DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops create mode 100644 Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops create mode 100644 Tools/DumpRenderTree/win/DumpRenderTreeRelease.vsprops create mode 100644 Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops create mode 100644 Tools/DumpRenderTree/win/ImageDiffDebug.vsprops create mode 100644 Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops create mode 100644 Tools/DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops create mode 100644 Tools/DumpRenderTree/win/ImageDiffProduction.vsprops create mode 100644 Tools/DumpRenderTree/win/ImageDiffRelease.vsprops create mode 100644 Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops create mode 100644 Tools/FindSafari/FindSafariDebug.vsprops create mode 100644 Tools/FindSafari/FindSafariDebugAll.vsprops create mode 100644 Tools/FindSafari/FindSafariDebugCairoCFLite.vsprops create mode 100644 Tools/FindSafari/FindSafariProduction.vsprops create mode 100644 Tools/FindSafari/FindSafariRelease.vsprops create mode 100644 Tools/FindSafari/FindSafariReleaseCairoCFLite.vsprops create mode 100644 Tools/FindSafari/FindSafariReleasePGO.vsprops create mode 100644 Tools/MiniBrowser/Configurations/MiniBrowserDebug.vsprops create mode 100644 Tools/MiniBrowser/Configurations/MiniBrowserDebugAll.vsprops create mode 100644 Tools/MiniBrowser/Configurations/MiniBrowserDebugCairoCFLite.vsprops create mode 100644 Tools/MiniBrowser/Configurations/MiniBrowserProduction.vsprops create mode 100644 Tools/MiniBrowser/Configurations/MiniBrowserRelease.vsprops create mode 100644 Tools/MiniBrowser/Configurations/MiniBrowserReleaseCairoCFLite.vsprops create mode 100644 Tools/QtTestBrowser/favicon.png create mode 100755 Tools/Scripts/generate-project-files create mode 100755 Tools/Scripts/read-checksum-from-png create mode 100755 Tools/Scripts/show-pretty-diff create mode 100644 Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png.py create mode 100644 Tools/Scripts/webkitpy/layout_tests/read_checksum_from_png_unittest.py create mode 100644 Tools/Scripts/webkitpy/style/checkers/changelog.py create mode 100644 Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py create mode 100644 Tools/Scripts/webkitpy/tool/steps/attachtobug.py create mode 100644 Tools/TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops create mode 100644 Tools/TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp create mode 100644 Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest.cpp create mode 100644 Tools/TestWebKitAPI/Tests/WebKit2/CanHandleRequest_Bundle.cpp create mode 100644 Tools/TestWebKitAPI/Tests/WebKit2/CookieManager.cpp create mode 100644 Tools/TestWebKitAPI/Tests/WebKit2/SendingMessagesToTheWebProcessBeforeItIsValid.cpp create mode 100644 Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp create mode 100644 Tools/WebKitAPITest/WebKitAPITestDebug.vsprops create mode 100644 Tools/WebKitAPITest/WebKitAPITestDebugAll.vsprops create mode 100644 Tools/WebKitAPITest/WebKitAPITestDebugCairoCFLite.vsprops create mode 100644 Tools/WebKitAPITest/WebKitAPITestProduction.vsprops create mode 100644 Tools/WebKitAPITest/WebKitAPITestRelease.vsprops create mode 100644 Tools/WebKitAPITest/WebKitAPITestReleaseCairoCFLite.vsprops create mode 100644 Tools/WebKitAPITest/config.h create mode 100644 Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops create mode 100644 Tools/WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops create mode 100644 Tools/WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops create mode 100644 Tools/WebKitLauncherWin/WebKitLauncherWinProduction.vsprops create mode 100644 Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops create mode 100644 Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops create mode 100644 Tools/WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops create mode 100644 Tools/WebKitTestRunner/cairo/TestInvocationCairo.cpp create mode 100644 Tools/WebKitTestRunner/cg/TestInvocationCG.cpp create mode 100644 Tools/WebKitTestRunner/config.h delete mode 100644 Tools/WebKitTestRunner/mac/TestInvocationMac.mm create mode 100644 Tools/WebKitTestRunner/win/InjectedBundleDebug.vsprops create mode 100644 Tools/WebKitTestRunner/win/InjectedBundleDebugAll.vsprops create mode 100644 Tools/WebKitTestRunner/win/InjectedBundleDebugCairoCFLite.vsprops create mode 100644 Tools/WebKitTestRunner/win/InjectedBundleProduction.vsprops create mode 100644 Tools/WebKitTestRunner/win/InjectedBundleRelease.vsprops create mode 100644 Tools/WebKitTestRunner/win/InjectedBundleReleaseCairoCFLite.vsprops create mode 100644 Tools/WebKitTestRunner/win/WebKitTestRunnerDebug.vsprops create mode 100644 Tools/WebKitTestRunner/win/WebKitTestRunnerDebugAll.vsprops create mode 100644 Tools/WebKitTestRunner/win/WebKitTestRunnerDebugCairoCFLite.vsprops create mode 100644 Tools/WebKitTestRunner/win/WebKitTestRunnerProduction.vsprops create mode 100644 Tools/WebKitTestRunner/win/WebKitTestRunnerRelease.vsprops create mode 100644 Tools/WebKitTestRunner/win/WebKitTestRunnerReleaseCairoCFLite.vsprops create mode 100644 Tools/WinLauncher/WinLauncherDebug.vsprops create mode 100644 Tools/WinLauncher/WinLauncherDebugAll.vsprops create mode 100644 Tools/WinLauncher/WinLauncherDebugCairoCFLite.vsprops create mode 100644 Tools/WinLauncher/WinLauncherProduction.vsprops create mode 100644 Tools/WinLauncher/WinLauncherRelease.vsprops create mode 100644 Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops create mode 100644 Tools/record-memory-win/record-memory-winDebug.vsprops create mode 100644 Tools/record-memory-win/record-memory-winDebugAll.vsprops create mode 100644 Tools/record-memory-win/record-memory-winDebugCairoCFLite.vsprops create mode 100644 Tools/record-memory-win/record-memory-winProduction.vsprops create mode 100644 Tools/record-memory-win/record-memory-winRelease.vsprops create mode 100644 Tools/record-memory-win/record-memory-winReleaseCairoCFLite.vsprops (limited to 'Tools') 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 @@ + + + + + + Leaks Viewer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + 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 @@
  • Commit Queue Status information.
  • ChangeSource information.
  • Test Results
  • +
  • Leaks Viewer
  • 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 + # . + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + Revert accidentally commited change. + + * DumpRenderTree/mac/ResourceLoadDelegate.mm: + (-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]): + +2011-03-28 Tony Chang + + 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 + + Removing Qt stub, since it doesn't use the same header as the others. + + * DumpRenderTree/qt/LayoutTestControllerQt.cpp: + +2011-03-28 Adele Peterson + + 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 + + Build fix. + + * DumpRenderTree/win/LayoutTestControllerWin.cpp: + (LayoutTestController::hasGrammarMarker): + +2011-03-28 Adele Peterson + + Reviewed by Eric Seidel. + + Testing support for 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 + + 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 + + Reviewed by Andreas Kling. + + Add myself to the committers list. + + * Scripts/webkitpy/common/config/committers.py: + +2011-03-28 Simon Fraser + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + Revert inadvertantly committed changes. + + * Scripts/old-run-webkit-tests: + * Scripts/webkitpy/layout_tests/run_webkit_tests.py: + +2011-03-26 Andreas Kling + + 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 + + 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 + + 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 + + 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 + + [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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + Make Leopard Debug bots and Windows XP Debug (Tests) core builders + + These bots are consistently green again. + + Fixes 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 + + 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 + + Fix failing tests on the WebKit2 bots. + + * WebKitTestRunner/TestController.cpp: + (WTR::TestController::resetStateToConsistentValues): + +2011-03-21 Daniel Sievers + + 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 + + Try again to get buildbot to show run-javascriptcore-tests's actual.html as an HTML file + + Fixes 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 + + 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 + + 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 + + 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 + + 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 + + Teach buildbot to treat run-javascriptcore-tests's actual.html as an HTML file + + Fixes 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 + + 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 + + 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 + + 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 + + Revised build fix for r81135. + + * WebKitTestRunner/Configurations/InjectedBundle.xcconfig: + * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: + +2011-03-18 Adam Roben + + Windows build fix + + * WebKitTestRunner/config.h: Add a missing #endif. + +2011-03-18 Andreas Kling + + Unbreak Qt build after r81494. + + * WebKitTestRunner/qt/TestInvocationQt.cpp: + (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): + +2011-03-18 Sam Weinig + + Fix windows build. This was really Adam Roben's fault. I swear! + + * WebKitTestRunner/config.h: + +2011-03-18 Sam Weinig + + 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 + + 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 + + Don't ellipsize long or indented function names in Leaks Viewer + + Fixes 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 + + Fix some leaks in DRT seen on the leaks bot + + Fixes 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 + + Fix a NSURLCredential leak seen on the leaks bot + + Fixes -[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 + + Unreviewed. + + Remove unnecessary brackets around my email address. + + * Scripts/webkitpy/common/config/committers.py: + +2011-03-18 Adam Roben + + Remove some files I accidentally added in r81454 + + * WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops: Removed. + * WebKitTestRunner/cg/TestInvocationCG.cpp: Removed. + +2011-03-18 Adam Roben + + Ignore an NSNumberFormatter leak on SnowLeopard + + * Scripts/old-run-webkit-tests: + (countAndPrintLeaks): Ignore leaks in -[NSNumberFormatter + getObjectValue:forString:errorDescription:]. + +2011-03-18 Adam Roben + + 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 + + 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 + + Mark leaky builds orange, even if all regression tests passed + + Fixes 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 + + 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 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 + + 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 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 + + Make Leaks Viewer able to count leaks in builds that didn't fail any regression tests + + Fixes 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 + + 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 + + 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 + + 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 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 + + 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 + + Make old-run-webkit-tests pick up mac-wk2 results when running in WebKit2 mode on Windows + + Fixes 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 + + 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 + + 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 + + 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 + + Reviewed by Adam Roben. + + Add Lucas Forschler to the list of WebKit committers. + + * Scripts/webkitpy/common/config/committers.py: + +2011-03-16 Sam Weinig + + 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 + + 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 + + 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 + + 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 + + [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 + + 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 + + Rubber-stamped by Adam Roben. + + Adding myself as a reviewer. + + * Scripts/webkitpy/common/config/committers.py: + +2011-03-15 Anders Carlsson + + Try to fix the Windows build. + + * DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp: + (NPDeallocateCalledBeforeNPShutdown::TestObject::~TestObject): + +2011-03-15 Anders Carlsson + + 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 + + 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 + + Build fix after r81135. + + * TestWebKitAPI/Configurations/InjectedBundle.xcconfig: + +2011-03-15 Dan Bernstein + + 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 + + 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 + + Build fix after r81135. + + * DumpRenderTree/cf/WebArchiveDumpSupport.cpp: + * DumpRenderTree/mac/WebArchiveDumpSupportMac.mm: + +2011-03-15 Kevin Ollivier + + 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 + + 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 + + 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 + + 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 + + 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 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 + + Add forgotten file from r81116 + + * TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops: Added. + +2011-03-14 Sam Weinig + + Reviewed by Adam Roben. + + about:blank fake responses don't get serialized when sent the UIProcess + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 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 + + Show a list of up to 10 recent leaky builds when Leaks Viewer loads + + Fixes 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 + + 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 + + Reviewed by Oliver Hunt. + + REGRESSION(r80892): 100,000+ leaks seen on the build bot + + * DumpRenderTree/LayoutTestController.cpp: + (LayoutTestController::staticFunctions): Remove duplicate entries. + +2011-03-14 Alice Liu + + 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 + + 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 . + + * Scripts/build-webkit: + +2011-03-14 Daniel Bates + + 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 + + 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 + + Unreviewed. Modify my email address in committers.py. + + * Scripts/webkitpy/common/config/committers.py: + +2011-03-13 Joe Wild + + 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 + + Reviewed by Mark Rowe. + + Build DumpRenderTree perl support only for the architectures + DumpRenderTree is being built for. + + * DumpRenderTree/mac/PerlSupport/Makefile: + +2011-03-12 Dan Bernstein + + Suggested by Mark Rowe. + + * DumpRenderTree/mac/Configurations/Base.xcconfig: Leave C++ exceptions enabled + as they were before r80915. + +2011-03-12 Anders Carlsson + + 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 + + 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 + + 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 + + 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., + ), and it + will load all the leaks files from that build. + + Fixes 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 + + Don't trigger a build when build.webkit.org's HTML files are modified + + Fixes 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 + + Roll out r80848 + + It was accidentally committed. + + * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js: + (LeaksViewer._loadLeaksFromURL): + +2011-03-11 Tony Chang + + 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 + + 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 + + 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 + + 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 + + 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 + + Ignore errors from files being held open when creating a test result archive + + Fixes 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 + + 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 + + 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 + + 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 + + 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 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 + + 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 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 + + 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 + + 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 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 + + 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 + + Reviewed by David Levin. + + Adding myself to the committer file. + + * Scripts/webkitpy/common/config/committers.py: + +2011-03-08 Jessie Berlin + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 + + 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 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 = ""; }; 1AC6C7810D07589B00CD3161 /* TestObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestObject.cpp; sourceTree = ""; }; 1AC77DCE120605B6005C19EF /* NPRuntimeRemoveProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeRemoveProperty.cpp; sourceTree = ""; }; + 1ACF898B132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPDeallocateCalledBeforeNPShutdown.cpp; sourceTree = ""; }; 1AD4CB2012A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetUserAgentWithNullNPPFromNPPNew.cpp; sourceTree = ""; }; 1AD9D2FD12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginScriptableNPObjectInvokeDefault.cpp; sourceTree = ""; }; 23BCB88F0EA57623003C6289 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; @@ -230,6 +234,8 @@ 375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = ""; }; 375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = ""; }; 375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = ""; }; + 3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageTrackerDelegate.h; sourceTree = ""; }; + 3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StorageTrackerDelegate.mm; sourceTree = ""; }; 440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = ""; }; 44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = ""; }; 44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = ""; }; @@ -460,6 +466,8 @@ BCA18B5E0C9B08C200114369 /* ResourceLoadDelegate.mm */, BCA18B5F0C9B08C200114369 /* UIDelegate.h */, BCA18B600C9B08C200114369 /* UIDelegate.mm */, + 3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */, + 3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */, ); name = Delegates; sourceTree = ""; @@ -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 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 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 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 #include #include +#include #include 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 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 destinationBuffer = adoptArrayPtr(new char[maxLength + 1]); + JSStringGetUTF8CString(destination.get(), destinationBuffer.get(), maxLength + 1); LayoutTestController* controller = static_cast(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 originURL(Adopt, JSValueToStringCopy(context, arguments[0], exception)); + ASSERT(!*exception); + + LayoutTestController* controller = static_cast(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(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(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(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(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(JSObjectGetPrivate(thisObject)); + + if (argumentCount < 1) + return JSValueMakeUndefined(context); + + JSRetainPtr 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(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(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(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 headerBuffer = adoptArrayPtr(new char[maxLength + 1]); + JSStringGetUTF8CString(header.get(), headerBuffer.get(), maxLength + 1); LayoutTestController* controller = static_cast(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(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(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 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 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 +#import + +@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 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 { + 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 { + 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 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 @@ - + CFBundleDevelopmentRegion @@ -44,6 +44,15 @@ Simple Netscape plug-in that handles test content for WebKit WebPluginMIMETypes + image/png + + WebPluginExtensions + + png + + WebPluginTypeDescription + PNG image + application/x-webkit-test-netscape WebPluginExtensions 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 @@ @@ -324,7 +324,7 @@ + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 -#import -#import +#include +#include +#include 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 #include #include 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 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 png; - webkit_support::EncodeBGRAPNG( - reinterpret_cast(sourceBitmap.getPixels()), - sourceBitmap.width(), sourceBitmap.height(), - static_cast(sourceBitmap.rowBytes()), discardTransparency, &png); + webkit_support::EncodeBGRAPNGWithChecksum(reinterpret_cast(sourceBitmap.getPixels()), sourceBitmap.width(), + sourceBitmap.height(), static_cast(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 errors; - - OSVERSIONINFOEX versionInfo; - ::ZeroMemory(&versionInfo, sizeof(OSVERSIONINFOEX)); - versionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); - ::GetVersionEx(reinterpret_cast(&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 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 #include @@ -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 -#ifdef __cplusplus -#undef new -#undef delete -#include -#endif +/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */ +#if USE(EXPORT_MACROS) + +#include + +#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 +#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(¶mValues[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 * Copyright (C) 2008 Alp Toker * Copyright (C) 2009 Jan Alonzo - * 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& 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 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 #import #import +#import #import #import #import @@ -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 #import #import +#import #import #import #import @@ -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 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 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 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 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 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 usernameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, username)); RetainPtr passwordCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, password)); - NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:(NSString *)urlStringCF.get()]]; + RetainPtr 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 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 #endif -#include "../../../Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h" +#include "DumpRenderTreeSupportQt.h" #include #include #include @@ -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 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 #include #include 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 #include 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 @@ @@ -610,7 +610,7 @@ /> + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ @@ -323,7 +323,7 @@ + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 webView; + if (FAILED(frame->webView(&webView))) + return; + + COMPtr webViewPrivate(Query, webView); + if (!webViewPrivate) + return; + + COMPtr element; + if (FAILED(webViewPrivate->elementFromJS(context, nodeObject, &element))) + return; + + COMPtr autofillElement(Query, element); + if (!autofillElement) + return; + + autofillElement->setAutofilled(autofilled); +} + void LayoutTestController::setCustomPolicyDelegate(bool setDelegate, bool permissive) { COMPtr 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 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 @@ + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ @@ -80,7 +80,7 @@ @@ -142,7 +142,7 @@ @@ -204,7 +204,7 @@ @@ -266,7 +266,7 @@ @@ -326,9 +326,9 @@ /> 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 @@ useragentlist.txt + favicon.png diff --git a/Tools/QtTestBrowser/favicon.png b/Tools/QtTestBrowser/favicon.png new file mode 100644 index 0000000..4462752 Binary files /dev/null and b/Tools/QtTestBrowser/favicon.png 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 #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 @@ -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 * * 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 +#include +#include +#include + + +#if defined(Q_WS_X11) +#include +#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 = < Set installation prefix to the given path (Gtk/Efl only) --makeargs= Optional Makefile flags + --qmakearg= 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 [ 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 () { 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 + + + + + + @@ -448,11 +460,11 @@ > + + @@ -519,6 +535,26 @@ > + + + + + + + + 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 @@ /> 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 @@ /> + + 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 @@ + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 + +/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */ +#if USE(EXPORT_MACROS) + +#include + +#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 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 @@ @@ -141,7 +141,7 @@ + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + + 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 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(messageBody)); WKRetainPtr ackMessageName(AdoptWK, WKStringCreateWithUTF8CString("Ack")); WKRetainPtr 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 textOutput(AdoptWK, WKStringCreateWithUTF8CString(m_outputStream.str().c_str())); WKDictionaryAddItem(doneMessageBody.get(), textOutputKey.get(), textOutput.get()); - WKRetainPtr textOnlyKey(AdoptWK, WKStringCreateWithUTF8CString("TextOnly")); - WKRetainPtr textOnly(AdoptWK, WKBooleanCreate(!m_layoutTestController->shouldDumpPixels())); - WKDictionaryAddItem(doneMessageBody.get(), textOnlyKey.get(), textOnly.get()); + WKRetainPtr 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 +#include #include #include #include @@ -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 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 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 #include -#include #include #include #include @@ -43,11 +43,6 @@ using namespace std; namespace WTR { -template static inline WKRetainPtr adoptWK(T item) -{ - return WKRetainPtr(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 url = adoptWK(WKURLRequestCopyURL(request)); + WKRetainPtr host = adoptWK(WKURLCopyHostName(url.get())); + WKRetainPtr 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 @@ -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 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 static inline WKRetainPtr adoptWK(const T item) +{ + return WKRetainPtr(AdoptWK, item); +} + inline WKRetainPtr toWK(JSStringRef string) { - return WKRetainPtr(AdoptWK, WKStringCreateWithJSString(string)); + return adoptWK(WKStringCreateWithJSString(string)); } inline WKRetainPtr toWK(JSRetainPtr string) @@ -92,6 +97,19 @@ inline std::ostream& operator<<(std::ostream& out, const WKRetainPtr& 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 messageName(AdoptWK, WKStringCreateWithUTF8CString("BeginTest")); - WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), 0); + WKRetainPtr messageName = adoptWK(WKStringCreateWithUTF8CString("BeginTest")); + WKRetainPtr 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 textOutputKey(AdoptWK, WKStringCreateWithUTF8CString("TextOutput")); WKStringRef textOutput = static_cast(WKDictionaryGetItemForKey(messageBodyDictionary, textOutputKey.get())); - WKRetainPtr textOnlyKey(AdoptWK, WKStringCreateWithUTF8CString("TextOnly")); - bool textOnly = WKBooleanGetValue(static_cast(WKDictionaryGetItemForKey(messageBodyDictionary, textOnlyKey.get()))); + WKRetainPtr pixelResultKey = adoptWK(WKStringCreateWithUTF8CString("PixelResult")); + WKImageRef pixelResult = static_cast(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 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 = ""; }; 6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = ""; }; 6510A77811EC643800410867 /* ColorBits.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ColorBits.ttf; path = fonts/ColorBits.ttf; sourceTree = ""; }; 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = ""; }; @@ -90,7 +89,6 @@ 6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher700.ttf; path = fonts/WebKitWeightWatcher700.ttf; sourceTree = ""; }; 6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher800.ttf; path = fonts/WebKitWeightWatcher800.ttf; sourceTree = ""; }; 6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = ""; }; - 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 = ""; }; 65EB859F11EC67CC0034D300 /* ActivateFonts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ActivateFonts.mm; sourceTree = ""; }; 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 = ""; }; BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformWebViewMac.mm; sourceTree = ""; }; BC8C795B11D2785D004535A1 /* TestControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestControllerMac.mm; sourceTree = ""; }; - BC8DAD5B1315C0EC00EC96FC /* TestInvocationMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestInvocationMac.mm; sourceTree = ""; }; BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundleMac.mm; sourceTree = ""; }; BC8FD8C8120E527F00F3E71A /* EventSendingController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSendingController.h; sourceTree = ""; }; BC8FD8C9120E527F00F3E71A /* EventSendingController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventSendingController.cpp; sourceTree = ""; }; BC8FD8CB120E52B000F3E71A /* EventSendingController.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = EventSendingController.idl; sourceTree = ""; }; 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 = ""; }; BC952C0B11F3B965003398B4 /* JSWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrapper.h; sourceTree = ""; }; BC952C0C11F3B965003398B4 /* JSWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWrapper.cpp; sourceTree = ""; }; BC952C0E11F3B97B003398B4 /* JSWrappable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWrappable.h; sourceTree = ""; }; @@ -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 = ""; @@ -283,7 +279,6 @@ BC7933FF118F7C84005EA8E2 /* main.mm */, BC7934E711906846005EA8E2 /* PlatformWebViewMac.mm */, BC8C795B11D2785D004535A1 /* TestControllerMac.mm */, - BC8DAD5B1315C0EC00EC96FC /* TestInvocationMac.mm */, ); path = mac; sourceTree = ""; @@ -299,6 +294,14 @@ path = Configurations; sourceTree = ""; }; + BC9192021333E4CD003011DC /* cg */ = { + isa = PBXGroup; + children = ( + BC9192041333E4F8003011DC /* TestInvocationCG.cpp */, + ); + name = cg; + sourceTree = ""; + }; 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 . 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/cg/TestInvocationCG.cpp b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp new file mode 100644 index 0000000..cba2908 --- /dev/null +++ b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp @@ -0,0 +1,154 @@ +/* + * Copyright (C) 2011 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "TestInvocation.h" + +#include "PlatformWebView.h" +#include "TestController.h" +#include +#include +#include +#include +#include + +#if PLATFORM(MAC) +#include +#endif + +#if PLATFORM(WIN) +static const CFStringRef kUTTypePNG = CFSTR("public.png"); +#endif + +namespace WTR { + +static CGContextRef createCGContextFromImage(WKImageRef wkImage) +{ + RetainPtr image(AdoptCF, WKImageCreateCGImage(wkImage)); + + 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 = CGColorSpaceCreateDeviceRGB(); + CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); + CGColorSpaceRelease(colorSpace); + + CGContextDrawImage(context, CGRectMake(0, 0, pixelsWide, pixelsHigh), image.get()); + + return context; +} + +void computeMD5HashStringForContext(CGContextRef bitmapContext, char hashString[33]) +{ + ASSERT(CGBitmapContextGetBitsPerPixel(bitmapContext) == 32); // ImageDiff assumes 32 bit RGBA, we must as well. + size_t pixelsHigh = CGBitmapContextGetHeight(bitmapContext); + size_t pixelsWide = CGBitmapContextGetWidth(bitmapContext); + size_t bytesPerRow = CGBitmapContextGetBytesPerRow(bitmapContext); + + // We need to swap the bytes to ensure consistent hashes independently of endianness + MD5 md5; + unsigned char* bitmapData = static_cast(CGBitmapContextGetData(bitmapContext)); +#if PLATFORM(MAC) + if ((CGBitmapContextGetBitmapInfo(bitmapContext) & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Big) { + for (unsigned row = 0; row < pixelsHigh; row++) { + Vector buffer(4 * pixelsWide); + for (unsigned column = 0; column < pixelsWide; column++) + buffer[column] = OSReadLittleInt32(bitmapData, 4 * column); + md5.addBytes(buffer); + bitmapData += bytesPerRow; + } + } else { +#endif + for (unsigned row = 0; row < pixelsHigh; row++) { + md5.addBytes(bitmapData, 4 * pixelsWide); + bitmapData += bytesPerRow; + } +#if PLATFORM(MAC) + } +#endif + + Vector hash; + md5.checksum(hash); + + hashString[0] = '\0'; + for (int i = 0; i < 16; i++) + snprintf(hashString, 33, "%s%02x", hashString, hash[i]); +} + +static void dumpBitmap(CGContextRef bitmapContext) +{ + RetainPtr image(AdoptCF, CGBitmapContextCreateImage(bitmapContext)); + RetainPtr imageData(AdoptCF, CFDataCreateMutable(0, 0)); + RetainPtr imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0)); + CGImageDestinationAddImage(imageDest.get(), image.get(), 0); + CGImageDestinationFinalize(imageDest.get()); + + const unsigned char* data = CFDataGetBytePtr(imageData.get()); + const size_t dataLength = CFDataGetLength(imageData.get()); + + + fprintf(stdout, "Content-Type: %s\n", "image/png"); + fprintf(stdout, "Content-Length: %lu\n", static_cast(dataLength)); + + const size_t bytesToWriteInOneChunk = 1 << 15; + size_t dataRemainingToWrite = dataLength; + while (dataRemainingToWrite) { + size_t bytesToWriteInThisChunk = std::min(dataRemainingToWrite, bytesToWriteInOneChunk); + size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, stdout); + if (bytesWritten != bytesToWriteInThisChunk) + break; + dataRemainingToWrite -= bytesWritten; + data += bytesWritten; + } +} + +void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image) +{ + CGContextRef context = createCGContextFromImage(image); + + // Compute the hash of the bitmap context pixels + char actualHash[33]; + computeMD5HashStringForContext(context, actualHash); + fprintf(stdout, "\nActualHash: %s\n", actualHash); + + // Check the computed hash against the expected one and dump image on mismatch + bool hashesMatch = false; + if (m_expectedPixelHash.length() > 0) { + ASSERT(m_expectedPixelHash.length() == 32); + + fprintf(stdout, "\nExpectedHash: %s\n", m_expectedPixelHash.c_str()); + + // FIXME: Do case insensitive compare. + if (m_expectedPixelHash == actualHash) + hashesMatch = true; + } + + if (!hashesMatch) + dumpBitmap(context); +} + +} // namespace WTR 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 + +/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */ +#if USE(EXPORT_MACROS) + +#include + +#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 -#include +#import "PlatformWebView.h" +#import +#import namespace WTR { diff --git a/Tools/WebKitTestRunner/mac/TestInvocationMac.mm b/Tools/WebKitTestRunner/mac/TestInvocationMac.mm deleted file mode 100644 index 13a0295..0000000 --- a/Tools/WebKitTestRunner/mac/TestInvocationMac.mm +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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 "TestInvocation.h" - -#include "PlatformWebView.h" -#include "TestController.h" -#include -#include -#include -#include - -#define COMMON_DIGEST_FOR_OPENSSL -#include - -namespace WTR { - -static CGContextRef createCGContextFromPlatformView(PlatformWebView* platformWebView) -{ - WKView* view = platformWebView->platformView(); - [view display]; - - NSSize webViewSize = [view frame].size; - size_t pixelsWide = static_cast(webViewSize.width); - size_t pixelsHigh = static_cast(webViewSize.height); - size_t rowBytes = (4 * pixelsWide + 63) & ~63; - void* buffer = calloc(pixelsHigh, rowBytes); - - CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); - 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); - - return context; -} - -void computeMD5HashStringForContext(CGContextRef bitmapContext, char hashString[33]) -{ - ASSERT(CGBitmapContextGetBitsPerPixel(bitmapContext) == 32); // ImageDiff assumes 32 bit RGBA, we must as well. - size_t pixelsHigh = CGBitmapContextGetHeight(bitmapContext); - size_t pixelsWide = CGBitmapContextGetWidth(bitmapContext); - size_t bytesPerRow = CGBitmapContextGetBytesPerRow(bitmapContext); - - // We need to swap the bytes to ensure consistent hashes independently of endianness - MD5_CTX md5Context; - MD5_Init(&md5Context); - unsigned char* bitmapData = static_cast(CGBitmapContextGetData(bitmapContext)); - if ((CGBitmapContextGetBitmapInfo(bitmapContext) & kCGBitmapByteOrderMask) == kCGBitmapByteOrder32Big) { - for (unsigned row = 0; row < pixelsHigh; row++) { - uint32_t buffer[pixelsWide]; - for (unsigned column = 0; column < pixelsWide; column++) - buffer[column] = OSReadLittleInt32(bitmapData, 4 * column); - MD5_Update(&md5Context, buffer, 4 * pixelsWide); - bitmapData += bytesPerRow; - } - } else { - for (unsigned row = 0; row < pixelsHigh; row++) { - MD5_Update(&md5Context, bitmapData, 4 * pixelsWide); - bitmapData += bytesPerRow; - } - } - - unsigned char hash[16]; - MD5_Final(hash, &md5Context); - - hashString[0] = '\0'; - for (int i = 0; i < 16; i++) - snprintf(hashString, 33, "%s%02x", hashString, hash[i]); -} - -static void dumpBitmap(CGContextRef bitmapContext) -{ - RetainPtr image(AdoptCF, CGBitmapContextCreateImage(bitmapContext)); - RetainPtr imageData(AdoptCF, CFDataCreateMutable(0, 0)); - RetainPtr imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0)); - CGImageDestinationAddImage(imageDest.get(), image.get(), 0); - CGImageDestinationFinalize(imageDest.get()); - - const unsigned char* data = CFDataGetBytePtr(imageData.get()); - const size_t dataLength = CFDataGetLength(imageData.get()); - - - fprintf(stdout, "Content-Type: %s\n", "image/png"); - fprintf(stdout, "Content-Length: %lu\n", static_cast(dataLength)); - - const size_t bytesToWriteInOneChunk = 1 << 15; - size_t dataRemainingToWrite = dataLength; - while (dataRemainingToWrite) { - size_t bytesToWriteInThisChunk = std::min(dataRemainingToWrite, bytesToWriteInOneChunk); - size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, stdout); - if (bytesWritten != bytesToWriteInThisChunk) - break; - dataRemainingToWrite -= bytesWritten; - data += bytesWritten; - } -} - -static void forceRepaintFunction(WKErrorRef, void* context) -{ - *static_cast(context) = true; -} - -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); - fprintf(stdout, "\nActualHash: %s\n", actualHash); - - // Check the computed hash against the expected one and dump image on mismatch - bool hashesMatch = false; - if (m_expectedPixelHash.length() > 0) { - ASSERT(m_expectedPixelHash.length() == 32); - - fprintf(stdout, "\nExpectedHash: %s\n", m_expectedPixelHash.c_str()); - - // FIXME: Do case insensitive compare. - if (m_expectedPixelHash == actualHash) - hashesMatch = true; - } - - if (!hashesMatch) - dumpBitmap(context); -} - -} // 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 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 @@ 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ /> 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 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 @@ @@ -406,6 +406,70 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ @@ -324,7 +324,7 @@ + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ @@ -141,7 +141,7 @@ + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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 @@ + + + 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'] -- cgit v1.1