1. 26 Aug, 2013 2 commits
  2. 14 May, 2013 1 commit
    • ap@apple.com's avatar
      [Mac] Add tests for secure event input · 3469b9f8
      ap@apple.com authored
              https://bugs.webkit.org/show_bug.cgi?id=116121
      
              Reviewed by Mark Rowe.
      
              * editing/secure-input: Added.
              * editing/secure-input/password-input-changed-type-expected.txt: Added.
              * editing/secure-input/password-input-changed-type.html: Added.
              * editing/secure-input/password-input-focusing-expected.txt: Added.
              * editing/secure-input/password-input-focusing-to-different-frame-expected.txt: Added.
              * editing/secure-input/password-input-focusing-to-different-frame.html: Added.
              * editing/secure-input/password-input-focusing.html: Added.
              * editing/secure-input/removed-password-input-expected.txt: Added.
              * editing/secure-input/removed-password-input.html: Added.
              * editing/secure-input/reset-state-on-navigation-expected.txt: Added.
              * editing/secure-input/reset-state-on-navigation.html: Added.
              * editing/secure-input/resources: Added.
              * editing/secure-input/resources/reset-state-on-navigation-target.html: Added.
              * platform/efl/TestExpectations:
              * platform/gtk/TestExpectations:
              * platform/mac-wk2/TestExpectations:
              * platform/mac/TestExpectations:
              * platform/qt/TestExpectations:
              * platform/win/TestExpectations:
              * platform/wincairo/TestExpectations:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3469b9f8
  3. 07 May, 2013 1 commit
    • commit-queue@webkit.org's avatar
      WebKitTestRunner needs testRunner.dumpDOMAsWebArchive · 412b714f
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=42324
      <rdar://problem/8193633>
      
      Patch by Alex Christensen <achristensen@apple.com> on 2013-05-07
      Reviewed by Tim Horton.
      
      * Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
      Added dumpDOMAsWebArchive JavaScript function to be called by test cases.
      * Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::dumpDOMAsWebArchive):
      Added dumpDOMAsWebArchive code that is called when dumping.
      (WTR::InjectedBundlePage::dump):
      Made DOMAsWebArchive case when dumping call dumpDOMAsWebArchive.
      * Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
      (InjectedBundlePage):
      Added dumpDOMAsWebArchive declaration.
      * Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
      (WTR::TestRunner::dumpDOMAsWebArchive):
      Added dumpDOMAsWebArchive JS callback function that sets m_whatToDump to DOMAsWebArchive.
      * Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      Added WebArchiveDumpSupport.cpp, WebArchiveDumpSupport.h, WebArchiveDumpSupportMac.mm to project.
      * Tools/WebKitTestRunner/cf: Added.
      * Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.cpp: Added.
      Copied from Tools/DumpRenderTree/cf for createXMLStringFromWebArchiveData and other functions it uses.
      (convertMIMEType):
      (convertWebResourceDataToString):
      (normalizeHTTPResponseHeaderFields):
      (normalizeWebResourceURL):
      (convertWebResourceResponseToDictionary):
      (compareResourceURLs):
      (createXMLStringFromWebArchiveData):
      * Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.h: Added.
      Copied from Tools/DumpRenderTree/cf for used symbol declarations.
      * Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm: Added.
      Copied from Tools/DumpRenderTree/mac for used functions.
      (createCFURLResponseFromResponseData):
      (supportedNonImageMIMETypes):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      412b714f
  4. 07 Jan, 2013 1 commit
    • rniwa@webkit.org's avatar
      Source/WebKit: Sorted the xcodeproj file. · 3203716e
      rniwa@webkit.org authored
      * WebKit.xcodeproj/project.pbxproj:
      
      Source/WebKit2: Sorted the xcodeproj file.
      
      * WebKit2.xcodeproj/project.pbxproj:
      
      Source/WTF: Sorted the xcodeproj file.
      
      * WTF.xcodeproj/project.pbxproj:
      
      Tools: Sorted xcodeprojs files.
      
      * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139010 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3203716e
  5. 29 Oct, 2012 1 commit
    • mrowe@apple.com's avatar
      Remove references to unsupported OS and Xcode versions. · 5b132015
      mrowe@apple.com authored
      Reviewed by Anders Carlsson.
      
      Source/JavaScriptCore:
      
      * Configurations/Base.xcconfig:
      * Configurations/CompilerVersion.xcconfig: Removed.
      * Configurations/DebugRelease.xcconfig:
      * Configurations/Version.xcconfig:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      
      Source/ThirdParty:
      
      * gtest/xcode/Config/CompilerVersion.xcconfig: Removed.
      * gtest/xcode/Config/General.xcconfig:
      
      Source/ThirdParty/ANGLE:
      
      * Configurations/Base.xcconfig:
      * Configurations/CompilerVersion.xcconfig: Removed.
      * Configurations/DebugRelease.xcconfig:
      
      Source/WebCore:
      
      * Configurations/Base.xcconfig:
      * Configurations/CompilerVersion.xcconfig: Removed.
      * Configurations/DebugRelease.xcconfig:
      * Configurations/Version.xcconfig:
      * Configurations/WebCore.xcconfig:
      * DerivedSources.make:
      * WebCore.xcodeproj/project.pbxproj:
      
      Source/WebKit:
      
      * WebKit.xcodeproj/project.pbxproj:
      
      Source/WebKit/mac:
      
      * Configurations/Base.xcconfig:
      * Configurations/CompilerVersion.xcconfig: Removed.
      * Configurations/DebugRelease.xcconfig:
      * Configurations/Version.xcconfig:
      
      Source/WebKit2:
      
      * Configurations/Base.xcconfig:
      * Configurations/CompilerVersion.xcconfig: Removed.
      * Configurations/DebugRelease.xcconfig:
      * Configurations/Version.xcconfig:
      * DerivedSources.make:
      * WebKit2.xcodeproj/project.pbxproj:
      
      Source/WTF:
      
      * Configurations/Base.xcconfig:
      * Configurations/CompilerVersion.xcconfig: Removed.
      * Configurations/DebugRelease.xcconfig:
      * WTF.xcodeproj/project.pbxproj:
      
      Tools:
      
      * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
      * DumpRenderTree/mac/Configurations/Base.xcconfig:
      * DumpRenderTree/mac/Configurations/CompilerVersion.xcconfig: Removed.
      * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
      * MiniBrowser/Configurations/Base.xcconfig:
      * MiniBrowser/Configurations/CompilerVersion.xcconfig: Removed.
      * MiniBrowser/Configurations/DebugRelease.xcconfig:
      * TestWebKitAPI/Configurations/Base.xcconfig:
      * TestWebKitAPI/Configurations/CompilerVersion.xcconfig: Removed.
      * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * WebKitTestRunner/Configurations/Base.xcconfig:
      * WebKitTestRunner/Configurations/CompilerVersion.xcconfig: Removed.
      * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132859 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5b132015
  6. 17 Oct, 2012 1 commit
    • commit-queue@webkit.org's avatar
      WebKitTestRunner needs testRunner.queueLoad · 76b6b778
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=42674
      
      Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-17
      Reviewed by Kenneth Rohde Christiansen.
      
      Tools:
      
      Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including
      Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process
      (as the needed functionality, like loading initiation, has to be invoked from UI process) and
      exchanges messages with Injected bundle.
      
      * WebKitTestRunner/CMakeLists.txt:
      * WebKitTestRunner/GNUmakefile.am:
      * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::InjectedBundle):
      (WTR::InjectedBundle::didReceiveMessage):
      (WTR::InjectedBundle::done):
      (WTR::InjectedBundle::shouldProcessWorkQueue):
      (WTR):
      (WTR::InjectedBundle::processWorkQueue):
      (WTR::InjectedBundle::queueBackNavigation):
      (WTR::InjectedBundle::queueLoad):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      (InjectedBundle):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
      (WTR::InjectedBundlePage::didFinishLoadForFrame):
      (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
      (WTR::InjectedBundlePage::locationChangeForFrame):
      (WTR):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
      (InjectedBundlePage):
      * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
      (WTR::TestRunner::queueBackNavigation):
      (WTR):
      (WTR::TestRunner::queueLoad):
      * WebKitTestRunner/InjectedBundle/TestRunner.h:
      (TestRunner):
      * WebKitTestRunner/Target.pri:
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::resetStateToConsistentValues):
      * WebKitTestRunner/TestController.h:
      (WTR::TestController::workQueueManager):
      (TestController):
      * WebKitTestRunner/TestInvocation.cpp:
      (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
      (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/WorkQueueManager.cpp: Added.
      (WTR):
      (WTR::mainPage):
      (WTR::goToItemAtIndex):
      (WTR::WorkQueueManager::WorkQueueManager):
      (WTR::WorkQueueManager::clearWorkQueue):
      (WTR::WorkQueueManager::processWorkQueue):
      (WTR::WorkQueueManager::queueLoad):
      (WTR::WorkQueueManager::queueBackNavigation):
      (WTR::WorkQueueManager::enqueue):
      * WebKitTestRunner/WorkQueueManager.h: Added.
      (WTR):
      (WorkQueueManager):
      (WTR::WorkQueueManager::isWorkQueueEmpty):
      (WorkQueueItem):
      (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem):
      * WebKitTestRunner/win/WebKitTestRunner.vcproj:
      
      LayoutTests:
      
      Unskipped corresponding tests for WK2 and WK2 EFL, put those which still failing to appropriate groups.
      
      * platform/efl-wk2/TestExpectations:
      * platform/wk2/TestExpectations:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131560 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      76b6b778
  7. 25 Sep, 2012 1 commit
    • simon.fraser@apple.com's avatar
      <rdar://problem/12351906> Have DumpRenderTree and WebKitTestRunner crash logs... · cb1abec5
      simon.fraser@apple.com authored
      <rdar://problem/12351906> Have DumpRenderTree and WebKitTestRunner crash logs show which test crashed
      
      Reviewed by Mark Rowe.
      
      Use a new WebKitSytemInterface function to add data to crash logs about which
      test was running when the crash happened.
      
      Source/WebCore:
      
      * WebCore.exp.in: Export wkSetCrashReportApplicationSpecificInformation
      * platform/mac/WebCoreSystemInterface.h: Add wkSetCrashReportApplicationSpecificInformation.
      * platform/mac/WebCoreSystemInterface.mm: Ditto.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface): Hook up the function pointer for [wk|WK]SetCrashReportApplicationSpecificInformation.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):  Hook up the function pointer for [wk|WK]SetCrashReportApplicationSpecificInformation.
      
      Tools:
      
      * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Make sure WEBKIT_SYSTEM_INTERFACE_LIBRARY is defined.
      * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig: link with the WebKitSystemInterface library.
      * DumpRenderTree/mac/FrameLoadDelegate.mm:
      (testPathFromURL): Given a (probably) file URL, return the part after "/LayoutTests/"
      (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]): Tell Crash Reporter which test was running,
      if we're the main frame and the test is active.
      * WebKitTestRunner/Configurations/DebugRelease.xcconfig: Make sure WEBKIT_SYSTEM_INTERFACE_LIBRARY is defined.
      * WebKitTestRunner/Configurations/InjectedBundle.xcconfig: link the injected bundle with the WebKitSystemInterface library.
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame): Call platformDidStartProvisionalLoadForFrame().
      (WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame): Stub for non-Mac platforms.
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
      Add a platformDidStartProvisionalLoadForFrame() for platform-specific work.
      * WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm: Added.
      (WTR::testPathFromURL): Given a (probably) file URL, return the part after "/LayoutTests/"
      (WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame): Tell Crash Reporter which test was running,
      if we're the main frame.
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Add InjectedBundlePageMac.mm.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cb1abec5
  8. 22 Sep, 2012 1 commit
    • dmazzoni@google.com's avatar
      AX: Layout tests would be easier to write if AccessibilityController could find an element by id · 8dea0ad0
      dmazzoni@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=97301
      
      Reviewed by Chris Fleizach.
      
      Source/WebCore:
      
      Add a method to get the DOM "id" attribute from an accessible object, only for layout tests.
      
      Makes existing test more cross-platform:
      Tests: accessibility/aria-hidden-with-elements.html
      
      * accessibility/mac/WebAccessibilityObjectWrapper.mm:
      (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
      
      Tools:
      
      Adds a new accessibleElementById method to AccessibilityController, to make it
      easier to write cross-platform layout tests.
      
      Implemented for Chromium and for Mac (DRT and WKTR).
      
      * DumpRenderTree/AccessibilityController.cpp:
      (getAccessibleElementByIdCallback):
      (AccessibilityController::getJSClass):
      * DumpRenderTree/AccessibilityController.h:
      (AccessibilityController):
      * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
      * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
      (AccessibilityController::AccessibilityController):
      (AccessibilityController::findAccessibleElementByIdRecursive):
      (AccessibilityController::getAccessibleElementById):
      (AccessibilityController::accessibleElementByIdGetterCallback):
      * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.h:
      (AccessibilityController):
      * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
      (AccessibilityController::accessibleElementById):
      * DumpRenderTree/mac/AccessibilityCommonMac.h: added
      * DumpRenderTree/mac/AccessibilityCommonMac.mm: added
      (+[NSString stringWithJSStringRef:]):
      (-[NSString createJSStringRef]):
      * DumpRenderTree/mac/AccessibilityControllerMac.mm:
      (findAccessibleObjectById):
      (AccessibilityController::accessibleElementById):
      * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
      * DumpRenderTree/win/AccessibilityControllerWin.cpp:
      (AccessibilityController::accessibleElementById):
      * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
      (WTR::AccessibilityController::accessibleElementById):
      * WebKitTestRunner/InjectedBundle/AccessibilityController.h:
      (AccessibilityController):
      * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.h: added
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm: added
      (+[NSString stringWithJSStringRef:]):
      (-[NSString createJSStringRef]):
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
      (WTR::findAccessibleObjectById):
      (WTR):
      (WTR::AccessibilityController::accessibleElementById):
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      
      LayoutTests:
      
      Modifies an existing test to use the new accessibleElementById
      method of AccessibilityController, enabling the test to pass on
      both Mac and Chromium.
      
      * accessibility/aria-hidden-with-elements.html:
      * platform/chromium/TestExpectations:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129308 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8dea0ad0
  9. 21 Sep, 2012 1 commit
    • benjamin@webkit.org's avatar
      [WK2] Add basic testing support for Geolocation · 04e047f0
      benjamin@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=97278
      
      Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-09-21
      Reviewed by Kenneth Rohde Christiansen.
      
      Source/WebKit2: 
      
      * Shared/API/c/WKNumber.h: Fix an unfortunate copy-paste :)
      
      * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
      * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      * WebProcess/InjectedBundle/InjectedBundle.h:
      (InjectedBundle):
      Remove the code forcing the Geolocation permissions. It was working around the normal
      Geolocation code and updating all the GeolocationController, which is a terrible idea.
      
      Tools: 
      
      Update the Geolocation testing to use the proper API in the UIProcess.
      
      * WebKitTestRunner/CMakeLists.txt:
      * WebKitTestRunner/GNUmakefile.am:
      
      * WebKitTestRunner/GeolocationProviderMock.cpp: Added.
      (WTR::startUpdatingCallback):
      (WTR::stopUpdatingCallback):
      (WTR::GeolocationProviderMock::GeolocationProvierMock):
      (WTR::GeolocationProviderMock::setMockGeolocationPosition):
      (WTR::GeolocationProviderMock::startUpdating):
      (WTR::GeolocationProviderMock::stopUpdating):
      (GeolocationProviderMock):
      The GeolocationProvider store the location update and deliver them as needed.
      
      WebCore GeolocationController do not support asynchronous update on start/stop. This is not
      a problem in this case because all the messages between the WebProcess and the UIProcess are
      asynchronous. Because of this, unlike GeolocationClientMock, we do not use a timer for event
      delivery.
      
      * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::setGeolocationPermission):
      (WTR::InjectedBundle::setMockGeolocationPosition):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      (InjectedBundle):
      * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
      (WTR::TestRunner::setGeolocationPermission):
      (WTR::TestRunner::setMockGeolocationPosition):
      From the InjectedBundle, we now pass the information to the UIProcess so that
      GeolocationProvider and the TestController can respond appropriately.
      
      * WebKitTestRunner/InjectedBundle/TestRunner.h:
      (TestRunner):
      * WebKitTestRunner/Target.pri:
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::TestController):
      (WTR::decidePolicyForGeolocationPermissionRequest):
      (WTR::TestController::createOtherPage):
      (WTR::TestController::initialize):
      (WTR::TestController::setMockGeolocationPosition):
      * WebKitTestRunner/TestController.h:
      (TestController):
      (WTR::TestController::setGeolocationPermission):
      (WTR::TestController::isGeolocationPermissionAllowed):
      * WebKitTestRunner/TestInvocation.cpp:
      (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/win/WebKitTestRunner.vcproj:
      
      LayoutTests: 
      
      * platform/wk2/Skipped: Unskip the passing tests.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04e047f0
  10. 29 Aug, 2012 1 commit
    • jonlee@apple.com's avatar
      [WK2] Basic WTR support for web notifications · 670044d4
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=95154
      <rdar://problem/12184492>
      
      Reviewed by Alexey Proskuryakov.
      
      Implement WTR support, without platform event output (bug 95233).
      
      Legacy APIs will not be supported, since many of the tests are skipped
      on ports that do test notifications, and the issue with using file:// as the origin means a lot of the permissions
      tests won't work. Bugs 81048 and 81697 will track migrating the existing tests to use the new testRunner API, and move
      the tests to http/tests/notifications.
      
      Permissions will be handled only in the injected bundle. This allows tests to set permission synchronously, and not
      require a chain of setTimeout()'s when writing a notification test. Clicking a notification, however, should
      be invoked from the UIProcess.
      
      * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::didReceiveMessage): When told to "Reset", clear out all of the permissions.
      (WTR::InjectedBundle::postSimulateWebNotificationClick): Tell the bundle client to simulate a click based on the
      notification's internal ID.
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
      (WTR::TestRunner::grantWebNotificationPermission): Manually set the permission using WKBundle SPI.
      (WTR::TestRunner::denyWebNotificationPermission): Manually set the permission using WKBundle SPI.
      (WTR::TestRunner::removeAllWebNotificationPermissions):
      (WTR::TestRunner::simulateWebNotificationClick): Post a message through the injected bundle.
      * WebKitTestRunner/InjectedBundle/TestRunner.h:
      
      Because supporting web notifications goes beyond a couple functions, move all of the logic into a WebNotificationProvider
      class.
      * WebKitTestRunner/TestInvocation.cpp:
      (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): When the injected bundle sends a message to simulate a click,
      TestInvocation forwards that request to the TestController.
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::initialize): Set the provider.
      (WTR::TestController::resetStateToConsistentValues): Tell the provider to reset.
      (WTR::TestController::simulateWebNotificationClick): Tell the provider to simulate a user clicking on a platform notification.
      * WebKitTestRunner/TestController.h: Holds an instance to the provider.
      
      The provider maintains a pointer to one notification manager (presumably the web process associated with WTR), and a set
      of notification IDs that have been "shown" by the platform. This allows us to simulate a click on a notification.
      * WebKitTestRunner/WebNotificationProvider.h: Added.
      * WebKitTestRunner/WebNotificationProvider.cpp: Added.
      (WTR::WebNotificationProvider::showWebNotification): Adds the notification to set of shown notifications. Notifies provider that
      the notification got shown.
      (WTR::WebNotificationProvider::closeWebNotification): Removes the notification from the set. Notifies provider that the notification
      got closed.
      (WTR::WebNotificationProvider::addNotificationManager): Maintains one manager, which is fine for testing purposes.
      (WTR::WebNotificationProvider::removeNotificationManager): Maintains one manager.
      (WTR::WebNotificationProvider::notificationPermissions): When the web process starts, it maintains an initial set of known
      permissions. For testing purposes, we always want this set to be empty.
      (WTR::WebNotificationProvider::simulateWebNotificationClick): Notifies provider that the notification got "clicked".
      (WTR::WebNotificationProvider::reset): To reset the state, we pretend that we closed all of the platform notifications.
      
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Add WebNotificationProvider.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      670044d4
  11. 15 Aug, 2012 1 commit
    • rniwa@webkit.org's avatar
      Rename LayoutTestController to TestRunner in WebKitTestRunner · 24fe9df5
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=93942
      
      Reviewed by Simon Fraser.
      
      Renamed the class and relevant files.
      
      * WebKitTestRunner/CMakeLists.txt:
      * WebKitTestRunner/DerivedSources.make:
      * WebKitTestRunner/GNUmakefile.am:
      * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl: Removed.
      * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Copied from Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl.
      * WebKitTestRunner/InjectedBundle/DerivedSources.pri:
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::didReceiveMessage):
      (WTR::InjectedBundle::beginTesting):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      (WTR::InjectedBundle::testRunner):
      (InjectedBundle):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp: Removed.
      * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Removed.
      * WebKitTestRunner/InjectedBundle/Target.pri:
      * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp.
      * WebKitTestRunner/InjectedBundle/TestRunner.h: Copied from Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h.
      (TestRunner):
      * WebKitTestRunner/InjectedBundle/efl/LayoutTestControllerEfl.cpp: Removed.
      * WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/efl/LayoutTestControllerEfl.cpp.
      (WTR::waitToDumpWatchdogTimerCallback):
      (WTR::TestRunner::platformInitialize):
      (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
      (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
      (WTR::TestRunner::pathToLocalResource):
      (WTR::TestRunner::platformName):
      * WebKitTestRunner/InjectedBundle/gtk/LayoutTestControllerGtk.cpp: Removed.
      * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/gtk/LayoutTestControllerGtk.cpp.
      (WTR::waitToDumpWatchdogTimerCallback):
      (WTR::TestRunner::platformInitialize):
      (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
      (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
      (WTR::TestRunner::pathToLocalResource):
      (WTR::TestRunner::platformName):
      * WebKitTestRunner/InjectedBundle/mac/LayoutTestControllerMac.mm: Removed.
      * WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm: Copied from Tools/WebKitTestRunner/InjectedBundle/mac/LayoutTestControllerMac.mm.
      (WTR::TestRunner::platformInitialize):
      (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
      (WTR::waitUntilDoneWatchdogTimerFired):
      (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
      (WTR::TestRunner::pathToLocalResource):
      (WTR::TestRunner::platformName):
      * WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp: Removed.
      * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp.
      (WTR::WatchdogTimerHelper::timerFired):
      (WTR::TestRunner::platformInitialize):
      (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
      (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
      (WTR::TestRunner::pathToLocalResource):
      (WTR::TestRunner::platformName):
      * WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp: Removed.
      * WebKitTestRunner/InjectedBundle/win/TestRunnerWin.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp.
      (WTR::TestRunner::platformInitialize):
      (WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
      (WTR::waitToDumpWatchdogTimerFired):
      (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
      (WTR::TestRunner::pathToLocalResource):
      (WTR::TestRunner::platformName):
      * WebKitTestRunner/PlatformEfl.cmake:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/win/InjectedBundle.vcproj:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125732 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      24fe9df5
  12. 01 Apr, 2012 1 commit
    • mitz@apple.com's avatar
      Source/WebCore: Composite Font References is a new established standard... · 407e2a9e
      mitz@apple.com authored
      Source/WebCore: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
      composite fonts from existing physical fonts.
      <rdar://problem/10717370>
      https://bugs.webkit.org/show_bug.cgi?id=82810
              
      CoreText have already the features enabled, here we added this to WebKit text layout and rendering.
      A member function getCompositeFontReferenceFontData is added to the SimpleFontData class for the component font
      correspond to the platformData, in this case, a NSFont. This is used when CoreText layout had resulted
      a component of the Composite Font Reference and its corresponding SimpleFontData object is then cached
      in the SimpleFontData object of the posting font (Composite Font Reference).
              
      When glyphs are encoded to form the GlyphPage for rendering, the Composite Font Reference is handled throught
      the CoreText layout path (using CTLine), here the resulting glyph is associated with a font which could
      be not the original font request. In this case, these are the component fonts of the Composite Font
      Reference. This is then identified and then added to the GlyphPage appropriately.
              
      To support this feature, a member function isCompositeFontReference is added to FontPlatformData to
      indicate a font is a Composite Font Reference. Also in order to pass the component font correctly a boolean
      isPrinterFont is added to one the FontPlatformData constructors to describe the NSFont.
      
      Patch by Tony Tseung <tseung@apple.com> on 2012-04-01
      Reviewed by Dan Bernstein.
      
      Added test LayoutTests/fast/text/international/text-spliced-font.html
      
      * WebCore.exp.in:
      Replaced obsolete FontPlatformData constructor entry.
      
      * platform/graphics/FontPlatformData.cpp:
      (WebCore::FontPlatformData::FontPlatformData):
      Copy of the additional m_isCompositeFontReference and m_isPrinterFont data members.
              
      (WebCore::FontPlatformData::operator=):
      Assignment of the additional m_isCompositeFontReference and m_isPrinterFont data members.
              
      * platform/graphics/FontPlatformData.h:
      (WebCore::FontPlatformData::FontPlatformData):
      (FontPlatformData):
      Default value of m_isCompositeFontReference and m_isPrinterFont data members are set to false in various constructors.
              
      (WebCore::FontPlatformData::isCompositeFontReference):
      Newly added for Composite Font Reference type font.
      
      (WebCore::FontPlatformData::isPrinterFont):
      Newly added for describing the NSFont parameter if is applicable.
      
      (WebCore::FontPlatformData::operator==):
      Comparison of the additional m_isCompositeFontReference and m_isPrinterFont data members.
      
      * platform/graphics/SimpleFontData.cpp:
      (WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
      Clean up the cache for component fonts of the Composite Font References.
      
      * platform/graphics/SimpleFontData.h:
      (SimpleFontData):
      Added member function const SimpleFontData* getCompositeFontReferenceFontData(NSFont *key) const.
              
      (DerivedFontData):
      Added CFDictionary for caching the component font of Composite Font Reference.
      
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      (WebCore::FontPlatformData::FontPlatformData):
      Data members m_isCompositeFontReference and m_isPrinterFont are initialised and their values are determined in the body of the contructor.
      
      (WebCore::FontPlatformData::setFont):
      Data members m_isCompositeFontReference and m_isPrinterFont are determined and set.
              
      * platform/graphics/mac/FontCacheMac.mm:
      (WebCore::FontCache::createFontPlatformData):
      Boolean value isUsingPrinterFont is passed in the new FontPlatformData constructor.
              
      * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
      (WebCore::shouldUseCoreText):
      Added the condition for Composite Font Reference type font.
              
      (WebCore::GlyphPage::fill):
      In the case of Composite Font Reference, when iterate the runs, component font of Composite Font
      Reference is used to fill the glyph index in the GlyphPage.
              
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::getCompositeFontReferenceFontData):
      Newly added method for the component fonts correspond to the platformData, in this case, a NSFont. 
      This SimpleFontData is created and cached in this object and will only be deleted when the destructor
      if this is called.
      
      Tools: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
      composite fonts from existing physical fonts.
      <rdar://problem/10717370>
      https://bugs.webkit.org/show_bug.cgi?id=82810
                  
      A new test font of this kind as been added to the test tools for running the webkit-tests
      
      Patch by Tony Tseung <tseung@apple.com> on 2012-04-01
      Reviewed by Dan Bernstein.
      
      * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
      Added new dependency SampleFont.sfont
              
      * DumpRenderTree/fonts/SampleFont.sfont: Added.
              
      * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (allowedFontFamilySet):
      Added the Composite Font Referene sample font "Hiragino Maru Gothic Monospaced" entry to the fonts white-list
              
      (activateTestingFonts):
      Added the registration of the Composite Font Referene sample font
              
      * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
      (WTR::allowedFontFamilySet):
      Added the Composite Font Referene sample font "Hiragino Maru Gothic Monospaced" entry to the fonts white-list
      
      (WTR::activateFonts):
      Added the registration of the Composite Font Referene sample font
      
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      Added new dependency SampleFont.sfont
      
      * WebKitTestRunner/fonts/SampleFont.sfont: Added.
      
      LayoutTests: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
      composite fonts from existing physical fonts.
      <rdar://problem/10717370>
      https://bugs.webkit.org/show_bug.cgi?id=82810
                  
      Added new LayoutTests/fast/text/international/text-spliced-font.html
      
      Patch by Tony Tseung <tseung@apple.com> on 2012-04-01
      Reviewed by Dan Bernstein.
      
      * fast/text/international/text-spliced-font.html: Added.
      * platform/mac/fast/text/international/text-spliced-font-expected.png: Added.
      * platform/mac/fast/text/international/text-spliced-font-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      407e2a9e
  13. 30 Mar, 2012 2 commits
    • mitz@apple.com's avatar
      Reverted r112767, because it caused many vertical text tests to fail. · 777458a1
      mitz@apple.com authored
      Source/WebCore: 
      
      * WebCore.exp.in:
      * platform/graphics/FontPlatformData.cpp:
      (WebCore::FontPlatformData::FontPlatformData):
      (WebCore::FontPlatformData::operator=):
      * platform/graphics/FontPlatformData.h:
      (WebCore::FontPlatformData::FontPlatformData):
      (FontPlatformData):
      (WebCore::FontPlatformData::isColorBitmapFont):
      (WebCore::FontPlatformData::hash):
      (WebCore::FontPlatformData::operator==):
      * platform/graphics/SimpleFontData.cpp:
      (WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
      * platform/graphics/SimpleFontData.h:
      (SimpleFontData):
      (DerivedFontData):
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      (WebCore::FontPlatformData::FontPlatformData):
      (WebCore::FontPlatformData::setFont):
      * platform/graphics/mac/FontCacheMac.mm:
      (WebCore::FontCache::createFontPlatformData):
      * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
      (WebCore::shouldUseCoreText):
      (WebCore::GlyphPage::fill):
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore):
      
      Tools: 
      
      * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
      * DumpRenderTree/fonts/SampleFont.sfont: Removed.
      * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (allowedFontFamilySet):
      (activateTestingFonts):
      * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
      (WTR::allowedFontFamilySet):
      (WTR::activateFonts):
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/fonts/SampleFont.sfont: Removed.
      
      LayoutTests: 
      
      * fast/text/international/text-spliced-font.html: Removed.
      * platform/mac/fast/text/international/text-spliced-font-expected.png: Removed.
      * platform/mac/fast/text/international/text-spliced-font-expected.txt: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      777458a1
    • mitz@apple.com's avatar
      Source/WebCore: Composite Font References is a new established standard... · 17e87f22
      mitz@apple.com authored
      Source/WebCore: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
      composite fonts from existing physical fonts.
      <rdar://problem/10717370>
      https://bugs.webkit.org/show_bug.cgi?id=82810
              
      CoreText have already the features enabled, here we added this to WebKit text layout and rendering.
      A member function getCompositeFontReferenceFontData is added to the SimpleFontData class for the component font
      correspond to the platformData, in this case, a NSFont. This is used when CoreText layout had resulted
      a component of the Composite Font Reference and its corresponding SimpleFontData object is then cached
      in the SimpleFontData object of the posting font (Composite Font Reference).
              
      When glyphs are encoded to form the GlyphPage for rendering, the Composite Font Reference is handled throught
      the CoreText layout path (using CTLine), here the resulting glyph is associated with a font which could
      be not the original font request. In this case, these are the component fonts of the Composite Font
      Reference. This is then identified and then added to the GlyphPage appropriately.
              
      To support this feature, a member function isCompositeFontReference is added to FontPlatformData to
      indicate a font is a Composite Font Reference. Also in order to pass the component font correctly a boolean
      isPrinterFont is added to one the FontPlatformData constructors to describe the NSFont.
      
      Patch by Tony Tseung <tseung@apple.com> on 2012-03-30
      Reviewed by Dan Bernstein.
      
      Added test LayoutTests/fast/text/international/text-spliced-font.html
      
      * WebCore.exp.in:
      Replaced obsolete FontPlatformData constructor entry.
      
      * platform/graphics/FontPlatformData.cpp:
      (WebCore::FontPlatformData::FontPlatformData):
      Copy of the additional m_isCompositeFontReference and m_isPrinterFont data members.
              
      (WebCore::FontPlatformData::operator=):
      Assignment of the additional m_isCompositeFontReference and m_isPrinterFont data members.
              
      * platform/graphics/FontPlatformData.h:
      (WebCore::FontPlatformData::FontPlatformData):
      (FontPlatformData):
      Default value of m_isCompositeFontReference and m_isPrinterFont data members are set to false in various constructors.
              
      (WebCore::FontPlatformData::isCompositeFontReference):
      Newly added for Composite Font Reference type font.
      
      (WebCore::FontPlatformData::isPrinterFont):
      Newly added for describing the NSFont parameter if is applicable.
      
      (WebCore::FontPlatformData::operator==):
      Comparison of the additional m_isCompositeFontReference and m_isPrinterFont data members.
      
      * platform/graphics/SimpleFontData.cpp:
      (WebCore::SimpleFontData::DerivedFontData::~DerivedFontData):
      Clean up the cache for component fonts of the Composite Font References.
      
      * platform/graphics/SimpleFontData.h:
      (SimpleFontData):
      Added member function const SimpleFontData* getCompositeFontReferenceFontData(NSFont *key) const.
              
      (DerivedFontData):
      Added CFDictionary for caching the component font of Composite Font Reference.
      
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      (WebCore::FontPlatformData::FontPlatformData):
      Data members m_isCompositeFontReference and m_isPrinterFont are initialised and their values are determined in the body of the contructor.
      
      (WebCore::FontPlatformData::setFont):
      Data members m_isCompositeFontReference and m_isPrinterFont are determined and set.
              
      * platform/graphics/mac/FontCacheMac.mm:
      (WebCore::FontCache::createFontPlatformData):
      Boolean value isUsingPrinterFont is passed in the new FontPlatformData constructor.
              
      * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
      (WebCore::shouldUseCoreText):
      Added the condition for Composite Font Reference type font.
              
      (WebCore::GlyphPage::fill):
      In the case of Composite Font Reference, when iterate the runs, component font of Composite Font
      Reference is used to fill the glyph index in the GlyphPage.
              
      * platform/graphics/mac/SimpleFontDataMac.mm:
      (WebCore::SimpleFontData::getCompositeFontReferenceFontData):
      Newly added method for the component fonts correspond to the platformData, in this case, a NSFont. 
      This SimpleFontData is created and cached in this object and will only be deleted when the destructor
      if this is called.
      
      Tools: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
      composite fonts from existing physical fonts.
      <rdar://problem/10717370>
      https://bugs.webkit.org/show_bug.cgi?id=82810
                  
      A new test font of this kind as been added to the test tools for running the webkit-tests
      
      Patch by Tony Tseung <tseung@apple.com> on 2012-03-30
      Reviewed by Dan Bernstein.
      
      * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
      Added new dependency SampleFont.sfont
              
      * DumpRenderTree/fonts/SampleFont.sfont: Added.
              
      * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (allowedFontFamilySet):
      Added the Composite Font Referene sample font "Hiragino Maru Gothic Monospaced" entry to the fonts white-list
              
      (activateTestingFonts):
      Added the registration of the Composite Font Referene sample font
              
      * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
      (WTR::allowedFontFamilySet):
      Added the Composite Font Referene sample font "Hiragino Maru Gothic Monospaced" entry to the fonts white-list
      
      (WTR::activateFonts):
      Added the registration of the Composite Font Referene sample font
      
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      Added new dependency SampleFont.sfont
      
      * WebKitTestRunner/fonts/SampleFont.sfont: Added.
      
      LayoutTests: Composite Font References is a new established standard (ISO/IEC 14496-28:2012) for specifying
      composite fonts from existing physical fonts.
      <rdar://problem/10717370>
      https://bugs.webkit.org/show_bug.cgi?id=82810
                  
      Added new LayoutTests/fast/text/international/text-spliced-font.html
      
      Patch by Tony Tseung <tseung@apple.com> on 2012-03-30
      Reviewed by Dan Bernstein.
      
      * fast/text/international/text-spliced-font.html: Added.
      * platform/mac/fast/text/international/text-spliced-font-expected.png: Added.
      * platform/mac/fast/text/international/text-spliced-font-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@112767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17e87f22
  14. 16 Mar, 2012 1 commit
    • slewis@apple.com's avatar
      Source/WebKit2: https://bugs.webkit.org/show_bug.cgi?id=81065 · 490c4db8
      slewis@apple.com authored
      <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142
      Add some string function exports to Windows so the WebKitTestRunner can use them.
      
      Reviewed by Geoff Garen.
      
      * win/WebKit2.def:
      
      Tools: https://bugs.webkit.org/show_bug.cgi?id=81065
      <rdar://problem/10944309> CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142
      Fix crash preventing WebKitTestRunner from working in Release.  
      WebKitTestRunner used ostringstream to collect output from the test.  ostringstream is incompatible with our
      FastMalloc overrides.  When copying strings out ostringstream a new string is allocated with FastMalloc because
      the allocation is inlined.  When that string is freed is uses the system malloc because that call is not inlined.
      
      I removed ostringstream in favor of StringBuilder.  
      
      Properly set NDEBUG on Release builds so we don't crash when when we free the strings StringBuilder created.
      
      Reviewed by Geoff Garen.
      
      Add DEBUG_DEFINES to set NDEBUG on release builds.
      * WebKitTestRunner/Configurations/Base.xcconfig:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      
      Remove ostringstream member in favor of StringBuilder.
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::initialize):
      (WTR::InjectedBundle::beginTesting):
      (WTR::InjectedBundle::done):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      (WTF):
      (WTR::InjectedBundle::stringBuilder):
      (InjectedBundle):
      
      Append output to StringBuilder.
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::hasPrefix):
      (WTR::dumpPath):
      (WTR::rangeToStr):
      (WTR::styleDecToStr):
      (WTR::frameToStr):
      (WTR::dumpFrameScrollPosition):
      (WTR::dumpFrameText):
      (WTR::dumpDescendantFramesText):
      (WTR::InjectedBundlePage::dump):
      (WTR::InjectedBundlePage::didReceiveTitleForFrame):
      (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame):
      (WTR::InjectedBundlePage::willSendRequestForFrame):
      (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
      (WTR::lastFileURLPathComponent):
      (WTR::InjectedBundlePage::willAddMessageToConsole):
      (WTR::InjectedBundlePage::willSetStatusbarText):
      (WTR::InjectedBundlePage::willRunJavaScriptAlert):
      (WTR::InjectedBundlePage::willRunJavaScriptConfirm):
      (WTR::InjectedBundlePage::willRunJavaScriptPrompt):
      (WTR::InjectedBundlePage::shouldBeginEditing):
      (WTR::InjectedBundlePage::shouldEndEditing):
      (WTR::InjectedBundlePage::shouldInsertNode):
      (WTR::InjectedBundlePage::shouldInsertText):
      (WTR::InjectedBundlePage::shouldDeleteRange):
      (WTR::InjectedBundlePage::shouldChangeSelectedRange):
      (WTR::InjectedBundlePage::shouldApplyStyle):
      (WTR::InjectedBundlePage::didBeginEditing):
      (WTR::InjectedBundlePage::didEndEditing):
      (WTR::InjectedBundlePage::didChange):
      (WTR::InjectedBundlePage::didChangeSelection):
      (WTR::InjectedBundlePage::supportsFullScreen):
      (WTR::InjectedBundlePage::enterFullScreenForElement):
      (WTR::InjectedBundlePage::exitFullScreenForElement):
      (WTR::InjectedBundlePage::beganEnterFullScreen):
      (WTR::InjectedBundlePage::beganExitFullScreen):
      (WTR::dumpBackForwardListItem):
      (WTR::InjectedBundlePage::dumpBackForwardList):
      * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
      (WTR::LayoutTestController::waitToDumpWatchdogTimerFired):
      (WTR::LayoutTestController::dumpConfigurationForViewport):
              
      Convert between WTF::String and WKStringRef.
      * WebKitTestRunner/StringFunctions.h:
      (WTR::toWTFString):
      (WTR):
      * WebKitTestRunner/TestInvocation.cpp:
      (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      490c4db8
  15. 24 Feb, 2012 1 commit
  16. 31 Jan, 2012 1 commit
  17. 08 Dec, 2011 1 commit
    • dmazzoni@google.com's avatar
      Source/WebCore: AccessibilityController should support listening to notifications on all elements. · 1851ba03
      dmazzoni@google.com authored
      https://bugs.webkit.org/show_bug.cgi?id=72866
      
      Changes accessibilitySetShouldRepostNotifications from an instance method
      into a class method so that it can be used for global notification listeners,
      not just for listeners on a particular object.
      
      Reviewed by Chris Fleizach.
      
      Test: accessibility/notification-listeners.html
      
      * accessibility/mac/WebAccessibilityObjectWrapper.h:
      * accessibility/mac/WebAccessibilityObjectWrapper.mm:
      (+[WebAccessibilityObjectWrapper accessibilitySetShouldRepostNotifications:]):
      (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
      
      Tools: Accessibility: AccessibilityController should support listening to notifications on all elements.
      https://bugs.webkit.org/show_bug.cgi?id=72866
      
      Adds addNotificationListener and removeNotificationListener methods
      to AccessibilityController, to listen to notifications on any element
      rather than a specific element. Mac (DRT and WKTR) and Chromium (DRT)
      implementations are all contained in this change.
      
      On Mac, refactors AccessibilityNotificationHandler into its own
      source file that can be used by both AccessibilityController and
      AccessibilityUIElement. (Both DRT and WKTR.)
      
      Reviewed by Chris Fleizach.
      
      * DumpRenderTree/AccessibilityController.cpp:
      (addNotificationListenerCallback):
      (removeNotificationListenerCallback):
      (AccessibilityController::getJSClass):
      * DumpRenderTree/AccessibilityController.h:
      * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
      * DumpRenderTree/chromium/AccessibilityController.cpp:
      (AccessibilityController::AccessibilityController):
      (AccessibilityController::notificationReceived):
      (AccessibilityController::addNotificationListenerCallback):
      (AccessibilityController::removeNotificationListenerCallback):
      * DumpRenderTree/chromium/AccessibilityController.h:
      * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
      (AccessibilityController::addNotificationListener):
      (AccessibilityController::removeNotificationListener):
      * DumpRenderTree/mac/AccessibilityControllerMac.mm:
      (AccessibilityController::~AccessibilityController):
      (AccessibilityController::addNotificationListener):
      (AccessibilityController::removeNotificationListener):
      * DumpRenderTree/mac/AccessibilityNotificationHandler.h: Added.
      * DumpRenderTree/mac/AccessibilityNotificationHandler.mm: Added.
      (-[NSString createJSStringRef]):
      (-[AccessibilityNotificationHandler init]):
      (-[AccessibilityNotificationHandler setPlatformElement:]):
      (-[AccessibilityNotificationHandler dealloc]):
      (-[AccessibilityNotificationHandler setCallback:]):
      (-[AccessibilityNotificationHandler startObserving]):
      (-[AccessibilityNotificationHandler _notificationReceived:]):
      * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
      (AccessibilityUIElement::addNotificationListener):
      * DumpRenderTree/win/AccessibilityControllerWin.cpp:
      (notificationListenerProc):
      (AccessibilityController::addNotificationListener):
      (AccessibilityController::removeNotificationListener):
      (AccessibilityController::winNotificationReceived):
      (AccessibilityController::winAddNotificationListener):
      * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
      (AccessibilityUIElement::addNotificationListener):
      * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
      (WTR::AccessibilityController::addNotificationListener):
      (WTR::AccessibilityController::removeNotificationListener):
      * WebKitTestRunner/InjectedBundle/AccessibilityController.h:
      (WTR::AccessibilityController::logAccessibilityEvents):
      * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp:
      (WTR::AccessibilityTextMarker::AccessibilityTextMarker):
      * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp:
      (WTR::AccessibilityTextMarkerRange::AccessibilityTextMarkerRange):
      * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm: Added.
      (WTR::AccessibilityController::addNotificationListener):
      (WTR::AccessibilityController::removeNotificationListener):
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.h: Added.
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm: Added.
      (-[NSString createJSStringRef]):
      (-[AccessibilityNotificationHandler init]):
      (-[AccessibilityNotificationHandler setPlatformElement:]):
      (-[AccessibilityNotificationHandler dealloc]):
      (-[AccessibilityNotificationHandler setCallback:]):
      (-[AccessibilityNotificationHandler startObserving]):
      (-[AccessibilityNotificationHandler _notificationReceived:]):
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
      (WTR::AccessibilityUIElement::AccessibilityUIElement):
      (WTR::AccessibilityUIElement::verticalScrollbar):
      (WTR::AccessibilityUIElement::addNotificationListener):
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      
      LayoutTests: Accessibility: AccessibilityController should support listening to notifications on all elements.
      https://bugs.webkit.org/show_bug.cgi?id=72866
      
      Previously, the Mac implementation of AccessibilityUIElement.addNotificationListener
      incorrectly triggered on notifications from all elements. Now it only triggers on
      notifications from the correct element, and a new addNotificationListener method
      in AccessibilityController can be used to trigger on notifications from all elements.
      
      Updates 2 tests that depended on the old incorrect behavior.
      
      Reviewed by Chris Fleizach.
      
      * accessibility/notification-listeners.html: Added.
      * platform/chromium/accessibility/notification-listeners-expected.txt: Added.
      * platform/gtk/Skipped:
      * platform/mac/accessibility/aria-expanded-notifications.html:
      * platform/mac/accessibility/aria-listbox-selectedchildren-change.html:
      * platform/mac/accessibility/notification-listeners-expected.txt: Added.
      * platform/win/Skipped:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@102378 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1851ba03
  18. 16 Nov, 2011 1 commit
    • cfleizach@apple.com's avatar
      WebKitTestRunner needs to support accessibility-related DRT APIs · 09faa13f
      cfleizach@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=42131
      
      Tools: 
      
      Reviewed by Beth Dakin.
      
      Port the AX code in DRT to WKTestRunner by using IDL.
      
      * DumpRenderTree/AccessibilityUIElement.cpp:
      (horizontalScrollbarCallback):
      (verticalScrollbarCallback):
      (AccessibilityUIElement::horizontalScrollbar):
      (AccessibilityUIElement::verticalScrollbar):
      (AccessibilityUIElement::getJSClass):
      * DumpRenderTree/AccessibilityUIElement.h:
      * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
      (AccessibilityUIElement::horizontalScrollbar):
      (AccessibilityUIElement::verticalScrollbar):
      * WebKitTestRunner/DerivedSources.make:
      * WebKitTestRunner/GNUmakefile.am:
      * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp: Added.
      (WTR::AccessibilityController::create):
      (WTR::AccessibilityController::AccessibilityController):
      (WTR::AccessibilityController::~AccessibilityController):
      (WTR::AccessibilityController::makeWindowObject):
      (WTR::AccessibilityController::wrapperClass):
      (WTR::AccessibilityController::rootElement):
      (WTR::AccessibilityController::focusedElement):
      (WTR::AccessibilityController::elementAtPoint):
      * WebKitTestRunner/InjectedBundle/AccessibilityController.h: Added.
      (WTR::AccessibilityController::logFocusEvents):
      (WTR::AccessibilityController::logValueChangeEvents):
      (WTR::AccessibilityController::logScrollingStartEvents):
      (WTR::AccessibilityController::logAccessibilityEvents):
      (WTR::AccessibilityController::addNotificationListener):
      (WTR::AccessibilityController::notificationReceived):
      (WTR::AccessibilityController::resetToConsistentState):
      * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.cpp: Added.
      (WTR::AccessibilityTextMarker::create):
      (WTR::AccessibilityTextMarker::AccessibilityTextMarker):
      (WTR::AccessibilityTextMarker::~AccessibilityTextMarker):
      (WTR::AccessibilityTextMarker::platformTextMarker):
      (WTR::AccessibilityTextMarker::wrapperClass):
      * WebKitTestRunner/InjectedBundle/AccessibilityTextMarker.h: Added.
      (WTR::AccessibilityTextMarker::isEqual):
      * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.cpp: Added.
      (WTR::AccessibilityTextMarkerRange::create):
      (WTR::AccessibilityTextMarkerRange::AccessibilityTextMarkerRange):
      (WTR::AccessibilityTextMarkerRange::~AccessibilityTextMarkerRange):
      (WTR::AccessibilityTextMarkerRange::platformTextMarkerRange):
      (WTR::AccessibilityTextMarkerRange::wrapperClass):
      * WebKitTestRunner/InjectedBundle/AccessibilityTextMarkerRange.h: Added.
      (WTR::AccessibilityTextMarkerRange::isEqual):
      * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp: Added.
      (WTR::AccessibilityUIElement::create):
      (WTR::AccessibilityUIElement::wrapperClass):
      (WTR::AccessibilityUIElement::isValid):
      (WTR::AccessibilityUIElement::AccessibilityUIElement):
      (WTR::AccessibilityUIElement::~AccessibilityUIElement):
      (WTR::AccessibilityUIElement::isEqual):
      (WTR::AccessibilityUIElement::elementAtPoint):
      (WTR::AccessibilityUIElement::childAtIndex):
      (WTR::AccessibilityUIElement::indexOfChild):
      (WTR::AccessibilityUIElement::childrenCount):
      (WTR::AccessibilityUIElement::titleUIElement):
      (WTR::AccessibilityUIElement::parentElement):
      (WTR::AccessibilityUIElement::takeFocus):
      (WTR::AccessibilityUIElement::takeSelection):
      (WTR::AccessibilityUIElement::addSelection):
      (WTR::AccessibilityUIElement::removeSelection):
      (WTR::AccessibilityUIElement::allAttributes):
      (WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
      (WTR::AccessibilityUIElement::linkedUIElementAtIndex):
      (WTR::AccessibilityUIElement::attributesOfDocumentLinks):
      (WTR::AccessibilityUIElement::attributesOfChildren):
      (WTR::AccessibilityUIElement::parameterizedAttributeNames):
      (WTR::AccessibilityUIElement::increment):
      (WTR::AccessibilityUIElement::decrement):
      (WTR::AccessibilityUIElement::showMenu):
      (WTR::AccessibilityUIElement::press):
      (WTR::AccessibilityUIElement::stringAttributeValue):
      (WTR::AccessibilityUIElement::uiElementAttributeValue):
      (WTR::AccessibilityUIElement::numberAttributeValue):
      (WTR::AccessibilityUIElement::boolAttributeValue):
      (WTR::AccessibilityUIElement::isAttributeSupported):
      (WTR::AccessibilityUIElement::isAttributeSettable):
      (WTR::AccessibilityUIElement::isActionSupported):
      (WTR::AccessibilityUIElement::role):
      (WTR::AccessibilityUIElement::subrole):
      (WTR::AccessibilityUIElement::roleDescription):
      (WTR::AccessibilityUIElement::title):
      (WTR::AccessibilityUIElement::description):
      (WTR::AccessibilityUIElement::language):
      (WTR::AccessibilityUIElement::stringValue):
      (WTR::AccessibilityUIElement::accessibilityValue):
      (WTR::AccessibilityUIElement::helpText):
      (WTR::AccessibilityUIElement::orientation):
      (WTR::AccessibilityUIElement::x):
      (WTR::AccessibilityUIElement::y):
      (WTR::AccessibilityUIElement::width):
      (WTR::AccessibilityUIElement::height):
      (WTR::AccessibilityUIElement::intValue):
      (WTR::AccessibilityUIElement::minValue):
      (WTR::AccessibilityUIElement::maxValue):
      (WTR::AccessibilityUIElement::valueDescription):
      (WTR::AccessibilityUIElement::insertionPointLineNumber):
      (WTR::AccessibilityUIElement::selectedTextRange):
      (WTR::AccessibilityUIElement::isEnabled):
      (WTR::AccessibilityUIElement::isRequired):
      (WTR::AccessibilityUIElement::isFocused):
      (WTR::AccessibilityUIElement::isFocusable):
      (WTR::AccessibilityUIElement::isSelected):
      (WTR::AccessibilityUIElement::isSelectable):
      (WTR::AccessibilityUIElement::isMultiSelectable):
      (WTR::AccessibilityUIElement::setSelectedChild):
      (WTR::AccessibilityUIElement::selectedChildrenCount):
      (WTR::AccessibilityUIElement::selectedChildAtIndex):
      (WTR::AccessibilityUIElement::isExpanded):
      (WTR::AccessibilityUIElement::isChecked):
      (WTR::AccessibilityUIElement::isVisible):
      (WTR::AccessibilityUIElement::isOffScreen):
      (WTR::AccessibilityUIElement::isCollapsed):
      (WTR::AccessibilityUIElement::isIgnored):
      (WTR::AccessibilityUIElement::hasPopup):
      (WTR::AccessibilityUIElement::hierarchicalLevel):
      (WTR::AccessibilityUIElement::clickPointX):
      (WTR::AccessibilityUIElement::clickPointY):
      (WTR::AccessibilityUIElement::documentEncoding):
      (WTR::AccessibilityUIElement::documentURI):
      (WTR::AccessibilityUIElement::url):
      (WTR::AccessibilityUIElement::speak):
      (WTR::AccessibilityUIElement::attributesOfColumnHeaders):
      (WTR::AccessibilityUIElement::attributesOfRowHeaders):
      (WTR::AccessibilityUIElement::attributesOfColumns):
      (WTR::AccessibilityUIElement::attributesOfRows):
      (WTR::AccessibilityUIElement::attributesOfVisibleCells):
      (WTR::AccessibilityUIElement::attributesOfHeader):
      (WTR::AccessibilityUIElement::indexInTable):
      (WTR::AccessibilityUIElement::rowIndexRange):
      (WTR::AccessibilityUIElement::columnIndexRange):
      (WTR::AccessibilityUIElement::rowCount):
      (WTR::AccessibilityUIElement::columnCount):
      (WTR::AccessibilityUIElement::selectedRowAtIndex):
      (WTR::AccessibilityUIElement::disclosedByRow):
      (WTR::AccessibilityUIElement::disclosedRowAtIndex):
      (WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
      (WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
      (WTR::AccessibilityUIElement::ariaIsGrabbed):
      (WTR::AccessibilityUIElement::ariaDropEffects):
      (WTR::AccessibilityUIElement::lineForIndex):
      (WTR::AccessibilityUIElement::rangeForLine):
      (WTR::AccessibilityUIElement::boundsForRange):
      (WTR::AccessibilityUIElement::setSelectedTextRange):
      (WTR::AccessibilityUIElement::stringForRange):
      (WTR::AccessibilityUIElement::attributedStringForRange):
      (WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
      (WTR::AccessibilityUIElement::uiElementForSearchPredicate):
      (WTR::AccessibilityUIElement::cellForColumnAndRow):
      (WTR::AccessibilityUIElement::horizontalScrollbar):
      (WTR::AccessibilityUIElement::verticalScrollbar):
      (WTR::AccessibilityUIElement::addNotificationListener):
      (WTR::AccessibilityUIElement::removeNotificationListener):
      (WTR::AccessibilityUIElement::textMarkerRangeForElement):
      (WTR::AccessibilityUIElement::textMarkerRangeLength):
      (WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
      (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
      (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
      (WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
      (WTR::AccessibilityUIElement::textMarkerForPoint):
      (WTR::AccessibilityUIElement::previousTextMarker):
      (WTR::AccessibilityUIElement::nextTextMarker):
      (WTR::AccessibilityUIElement::stringForTextMarkerRange):
      * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h: Added.
      (WTR::AccessibilityUIElement::platformUIElement):
      * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl: Added.
      * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl: Added.
      * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl: Added.
      * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: Added.
      * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::beginTesting):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      (WTR::InjectedBundle::accessibilityController):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::didClearWindowForFrame):
      * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
      * WebKitTestRunner/InjectedBundle/gtk/LayoutTestControllerGtk.cpp:
      (WTR::LayoutTestController::platformName):
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm: Added.
      (WTR::AccessibilityTextMarker::isEqual):
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm: Added.
      (WTR::AccessibilityTextMarkerRange::isEqual):
      * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: Added.
      (+[NSString stringWithJSStringRef:]):
      (-[NSString createJSStringRef]):
      (-[AccessibilityNotificationHandler initWithPlatformElement:]):
      (-[AccessibilityNotificationHandler dealloc]):
      (-[AccessibilityNotificationHandler _notificationReceived:]):
      (-[AccessibilityNotificationHandler setCallback:]):
      (WTR::AccessibilityUIElement::AccessibilityUIElement):
      (WTR::AccessibilityUIElement::~AccessibilityUIElement):
      (WTR::AccessibilityUIElement::isEqual):
      (WTR::descriptionOfValue):
      (WTR::attributesOfElement):
      (WTR::concatenateAttributeAndValue):
      (WTR::convertNSArrayToVector):
      (WTR::descriptionOfElements):
      (WTR::AccessibilityUIElement::getLinkedUIElements):
      (WTR::AccessibilityUIElement::getDocumentLinks):
      (WTR::AccessibilityUIElement::getChildren):
      (WTR::AccessibilityUIElement::getChildrenWithRange):
      (WTR::AccessibilityUIElement::childrenCount):
      (WTR::AccessibilityUIElement::elementAtPoint):
      (WTR::AccessibilityUIElement::indexOfChild):
      (WTR::AccessibilityUIElement::childAtIndex):
      (WTR::AccessibilityUIElement::linkedUIElementAtIndex):
      (WTR::AccessibilityUIElement::ariaOwnsElementAtIndex):
      (WTR::AccessibilityUIElement::ariaFlowToElementAtIndex):
      (WTR::AccessibilityUIElement::disclosedRowAtIndex):
      (WTR::AccessibilityUIElement::selectedChildAtIndex):
      (WTR::AccessibilityUIElement::selectedChildrenCount):
      (WTR::AccessibilityUIElement::selectedRowAtIndex):
      (WTR::AccessibilityUIElement::titleUIElement):
      (WTR::AccessibilityUIElement::parentElement):
      (WTR::AccessibilityUIElement::disclosedByRow):
      (WTR::AccessibilityUIElement::attributesOfLinkedUIElements):
      (WTR::AccessibilityUIElement::attributesOfDocumentLinks):
      (WTR::AccessibilityUIElement::attributesOfChildren):
      (WTR::AccessibilityUIElement::allAttributes):
      (WTR::AccessibilityUIElement::stringAttributeValue):
      (WTR::AccessibilityUIElement::numberAttributeValue):
      (WTR::AccessibilityUIElement::uiElementAttributeValue):
      (WTR::AccessibilityUIElement::boolAttributeValue):
      (WTR::AccessibilityUIElement::isAttributeSettable):
      (WTR::AccessibilityUIElement::isAttributeSupported):
      (WTR::AccessibilityUIElement::parameterizedAttributeNames):
      (WTR::AccessibilityUIElement::role):
      (WTR::AccessibilityUIElement::subrole):
      (WTR::AccessibilityUIElement::roleDescription):
      (WTR::AccessibilityUIElement::title):
      (WTR::AccessibilityUIElement::description):
      (WTR::AccessibilityUIElement::orientation):
      (WTR::AccessibilityUIElement::stringValue):
      (WTR::AccessibilityUIElement::language):
      (WTR::AccessibilityUIElement::helpText):
      (WTR::AccessibilityUIElement::x):
      (WTR::AccessibilityUIElement::y):
      (WTR::AccessibilityUIElement::width):
      (WTR::AccessibilityUIElement::height):
      (WTR::AccessibilityUIElement::clickPointX):
      (WTR::AccessibilityUIElement::clickPointY):
      (WTR::AccessibilityUIElement::intValue):
      (WTR::AccessibilityUIElement::minValue):
      (WTR::AccessibilityUIElement::maxValue):
      (WTR::AccessibilityUIElement::valueDescription):
      (WTR::AccessibilityUIElement::insertionPointLineNumber):
      (WTR::AccessibilityUIElement::isActionSupported):
      (WTR::AccessibilityUIElement::isEnabled):
      (WTR::AccessibilityUIElement::isRequired):
      (WTR::AccessibilityUIElement::isFocused):
      (WTR::AccessibilityUIElement::isSelected):
      (WTR::AccessibilityUIElement::isExpanded):
      (WTR::AccessibilityUIElement::isChecked):
      (WTR::AccessibilityUIElement::hierarchicalLevel):
      (WTR::AccessibilityUIElement::speak):
      (WTR::AccessibilityUIElement::ariaIsGrabbed):
      (WTR::AccessibilityUIElement::ariaDropEffects):
      (WTR::AccessibilityUIElement::lineForIndex):
      (WTR::AccessibilityUIElement::rangeForLine):
      (WTR::AccessibilityUIElement::boundsForRange):
      (WTR::AccessibilityUIElement::stringForRange):
      (WTR::AccessibilityUIElement::attributedStringForRange):
      (WTR::AccessibilityUIElement::attributedStringRangeIsMisspelled):
      (WTR::AccessibilityUIElement::uiElementForSearchPredicate):
      (WTR::AccessibilityUIElement::attributesOfColumnHeaders):
      (WTR::AccessibilityUIElement::attributesOfRowHeaders):
      (WTR::AccessibilityUIElement::attributesOfColumns):
      (WTR::AccessibilityUIElement::attributesOfRows):
      (WTR::AccessibilityUIElement::attributesOfVisibleCells):
      (WTR::AccessibilityUIElement::attributesOfHeader):
      (WTR::AccessibilityUIElement::rowCount):
      (WTR::AccessibilityUIElement::columnCount):
      (WTR::AccessibilityUIElement::indexInTable):
      (WTR::AccessibilityUIElement::rowIndexRange):
      (WTR::AccessibilityUIElement::columnIndexRange):
      (WTR::AccessibilityUIElement::cellForColumnAndRow):
      (WTR::AccessibilityUIElement::horizontalScrollbar):
      (WTR::AccessibilityUIElement::verticalScrollbar):
      (WTR::AccessibilityUIElement::selectedTextRange):
      (WTR::AccessibilityUIElement::setSelectedTextRange):
      (WTR::AccessibilityUIElement::increment):
      (WTR::AccessibilityUIElement::decrement):
      (WTR::AccessibilityUIElement::showMenu):
      (WTR::AccessibilityUIElement::press):
      (WTR::AccessibilityUIElement::setSelectedChild):
      (WTR::AccessibilityUIElement::accessibilityValue):
      (WTR::AccessibilityUIElement::documentEncoding):
      (WTR::AccessibilityUIElement::documentURI):
      (WTR::AccessibilityUIElement::url):
      (WTR::AccessibilityUIElement::addNotificationListener):
      (WTR::AccessibilityUIElement::removeNotificationListener):
      (WTR::AccessibilityUIElement::isFocusable):
      (WTR::AccessibilityUIElement::isSelectable):
      (WTR::AccessibilityUIElement::isMultiSelectable):
      (WTR::AccessibilityUIElement::isVisible):
      (WTR::AccessibilityUIElement::isOffScreen):
      (WTR::AccessibilityUIElement::isCollapsed):
      (WTR::AccessibilityUIElement::isIgnored):
      (WTR::AccessibilityUIElement::hasPopup):
      (WTR::AccessibilityUIElement::takeFocus):
      (WTR::AccessibilityUIElement::takeSelection):
      (WTR::AccessibilityUIElement::addSelection):
      (WTR::AccessibilityUIElement::removeSelection):
      (WTR::AccessibilityUIElement::textMarkerRangeForElement):
      (WTR::AccessibilityUIElement::textMarkerRangeLength):
      (WTR::AccessibilityUIElement::previousTextMarker):
      (WTR::AccessibilityUIElement::nextTextMarker):
      (WTR::AccessibilityUIElement::stringForTextMarkerRange):
      (WTR::AccessibilityUIElement::textMarkerRangeForMarkers):
      (WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange):
      (WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange):
      (WTR::AccessibilityUIElement::textMarkerForPoint):
      (WTR::AccessibilityUIElement::accessibilityElementForTextMarker):
      * WebKitTestRunner/InjectedBundle/mac/LayoutTestControllerMac.mm:
      (WTR::LayoutTestController::platformName):
      * WebKitTestRunner/InjectedBundle/qt/LayoutTestControllerQt.cpp:
      (WTR::LayoutTestController::platformName):
      * WebKitTestRunner/InjectedBundle/win/LayoutTestControllerWin.cpp:
      (WTR::LayoutTestController::platformName):
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/win/InjectedBundle.vcproj:
      
      LayoutTests: 
      
      Cleanup tests and skip lists so that accessibility tests can run
      in WK2. This mostly involved handling returned elements that might be nil,
      something that did not happen in DRT.
      
      Reviewed by Beth Dakin.
      
      * accessibility/aria-labelledby-overrides-label-expected.txt:
      * accessibility/aria-labelledby-overrides-label.html:
      * accessibility/non-data-table-cell-title-ui-element.html:
      * accessibility/th-as-title-ui.html:
          Make sure a nil titleUIElement is accounted for in these tests.
      * platform/gtk-wk2/Skipped:
      * platform/mac/accessibility/aria-expanded-notifications-expected.txt:
      * platform/mac/accessibility/aria-expanded-notifications.html:
      * platform/mac/accessibility/aria-invalid-expected.txt:
      * platform/mac/accessibility/aria-invalid.html:
      * platform/mac/accessibility/aria-liveregions-addedelement-expected.txt:
      * platform/mac/accessibility/aria-liveregions-addedelement.html:
      * platform/mac/accessibility/aria-liveregions-changedalt-expected.txt:
      * platform/mac/accessibility/aria-liveregions-changedalt.html:
      * platform/mac/accessibility/aria-liveregions-changedtext-expected.txt:
      * platform/mac/accessibility/aria-liveregions-changedtext.html:
      * platform/mac/accessibility/aria-liveregions-removedelement-expected.txt:
      * platform/mac/accessibility/aria-liveregions-removedelement.html:
           All the preceeding layout tests use alert() to output the results of notifications. This
           is causing re-ordering issues on WK2, so I've moved them all to output that notification
           data to a separate element from "console".
      * platform/mac/accessibility/html-section-elements-expected.txt:
      * platform/mac/accessibility/html-section-elements.html:
           Remove nil element access that is unnecessary.
      * platform/mac/accessibility/html-slider-indicator-expected.txt:
      * platform/mac/accessibility/html-slider-indicator.html:
      * platform/mac/accessibility/search-predicate.html:
           Add an alt tag to <img> so that it always shows up in the AX tree.
      * platform/mac/accessibility/selection-value-changes-for-aria-textbox.html:
      * platform/mac/accessibility/textbox-role-reports-notifications-expected.txt:
           Remove the notification listener properly (was causing flakiness).
      * platform/mac/accessibility/textbox-role-reports-notifications.html:
      * platform/mac/accessibility/update-children-when-aria-role-changes-expected.txt:
      * platform/mac/accessibility/update-children-when-aria-role-changes.html:
           Account for when element's returned are nil.
      * platform/win-wk2/Skipped:
           Skip all accessibility tests on win.
      * platform/wk2/Skipped:
           Skip all accessibility tests on gtk.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      09faa13f
  19. 02 Nov, 2011 1 commit
  20. 11 Oct, 2011 1 commit
  21. 10 Oct, 2011 2 commits
    • commit-queue@webkit.org's avatar
      Unreviewed, rolling out r97082. · 9e5e6d69
      commit-queue@webkit.org authored
      http://trac.webkit.org/changeset/97082
      https://bugs.webkit.org/show_bug.cgi?id=69784
      
      broke Windows build (Requested by smfr on #webkit).
      
      Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-10-10
      
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/cg/TestInvocationCG.cpp: Renamed from Tools/WebKitTestRunner/cg/TestInvocationCG.mm.
      (WTR::createCGContextFromImage):
      (WTR::computeMD5HashStringForContext):
      (WTR::dumpBitmap):
      (WTR::paintRepaintRectOverlay):
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
      * WebKitTestRunner/mac/PlatformWebViewMac.mm:
      (WTR::PlatformWebView::PlatformWebView):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e5e6d69
    • simon.fraser@apple.com's avatar
      3D transforms are flattened in WebKit2 snapshots · 0e0d547b
      simon.fraser@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=68276
      
      Reviewed by Anders Carlsson.
      
      The WKImage passed from the WebProcess when pixel dumping is created by painting compositing layers
      flattened, which flattens 3D transforms. Instead, use CGWindowListCreateImage() to get a snapshot of
      the window when doing pixel tests.
      
      Also allow the window to auto-display, so that Core Animation layers are rendered, and animate.
      
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: TestInvocationCG became a .mm file
      * WebKitTestRunner/cg/TestInvocationCG.mm: Renamed from Tools/WebKitTestRunner/cg/TestInvocationCG.cpp.
      (WTR::createBitmapCGContext): Utility function to create a bitmap context.
      (WTR::computeMD5HashStringForContext):
      (WTR::dumpBitmap):
      (WTR::paintRepaintRectOverlay):
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Use CGWindowListCreateImage() to
      grap a snapshot of the window, rather than relying on the WKImage which was passed from the web process.
      * WebKitTestRunner/mac/PlatformWebViewMac.mm:
      (WTR::PlatformWebView::PlatformWebView): Remove the line that turned off autoDisplay for the NSWindow.
      We need the window to autodisplay for Core Animation to render layers and start animations.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@97082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e0d547b
  22. 05 Oct, 2011 1 commit
    • commit-queue@webkit.org's avatar
      [WK2] Support setMarkedText/hasMarkedText/unmarkText/insertText for WTR TextInputController · 7ac808ae
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=68924
      
      Source/WebKit2:
      
      Implemented WKBundlePage private APIs to support the above functions.
      
      Patch by Chang Shu <cshu@webkit.org> on 2011-10-05
      Reviewed by Darin Adler.
      
      * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
      (WKBundlePageSetComposition):
      (WKBundlePageHasComposition):
      (WKBundlePageConfirmComposition):
      (WKBundlePageConfirmCompositionWithText):
      * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::setCompositionForTesting):
      (WebKit::WebPage::hasCompositionForTesting):
      (WebKit::WebPage::confirmCompositionForTesting):
      * WebProcess/WebPage/WebPage.h:
      
      Tools:
      
      Added TextInputController files and JS interfaces for the above functions.
      
      Patch by Chang Shu <cshu@webkit.org> on 2011-10-05
      Reviewed by Darin Adler.
      
      * WebKitTestRunner/DerivedSources.make:
      * WebKitTestRunner/DerivedSources.pro:
      * WebKitTestRunner/GNUmakefile.am:
      * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl: Added.
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::beginTesting):
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      (WTR::InjectedBundle::textInputController):
      * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
      (WTR::InjectedBundlePage::didClearWindowForFrame):
      * WebKitTestRunner/InjectedBundle/TextInputController.cpp: Added.
      (WTR::TextInputController::create):
      (WTR::TextInputController::TextInputController):
      (WTR::TextInputController::~TextInputController):
      (WTR::TextInputController::wrapperClass):
      (WTR::TextInputController::makeWindowObject):
      (WTR::TextInputController::setMarkedText):
      (WTR::TextInputController::hasMarkedText):
      (WTR::TextInputController::unmarkText):
      (WTR::TextInputController::insertText):
      * WebKitTestRunner/InjectedBundle/TextInputController.h: Added.
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/win/InjectedBundle.vcproj:
      
      LayoutTests:
      
      Unskip passed tests.
      
      Patch by Chang Shu <cshu@webkit.org> on 2011-10-05
      Reviewed by Darin Adler.
      
      * platform/wk2/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ac808ae
  23. 13 Sep, 2011 1 commit
    • commit-queue@webkit.org's avatar
      [WK2] [Mac] Implement KeyDown function for WebKit2 EventSender. · 1c00c3e3
      commit-queue@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=57515
      
      Source/WebKit2:
      
      The code change in WebKit2 allows key events being sent to WebProcess from UIProcess synchronously.
      
      Patch by Chang Shu <cshu@webkit.org> on 2011-09-13
      Reviewed by Darin Adler.
      
      * UIProcess/API/C/WKPage.cpp:
      (WKPageSetShouldSendKeyboardEventSynchronously):
      * UIProcess/API/C/WKPagePrivate.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::WebPageProxy):
      (WebKit::WebPageProxy::handleKeyboardEvent):
      * UIProcess/WebPageProxy.h:
      (WebKit::WebPageProxy::setShouldSendKeyboardEventSynchronously):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::keyEventSyncForTesting):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      
      Tools:
      
      The code change in WebKitTestRunner first sends keydown event from InjectedBundle to
      TestController synchronously. The latter then sends simulated event to WebKit2 module,
      which is synchronous, too.
      
      Patch by Chang Shu <cshu@webkit.org> on 2011-09-13
      Reviewed by Darin Adler.
      
      * WebKitTestRunner/EventSenderProxy.h: Added.
      (WTR::EventSenderProxy::EventSenderProxy):
      * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
      * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
      (WTR::EventSendingController::keyDown):
      * WebKitTestRunner/InjectedBundle/EventSendingController.h:
      * WebKitTestRunner/PlatformWebView.h:
      (WTR::PlatformWebView::platformWindow):
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::TestController):
      (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):
      * WebKitTestRunner/TestController.h:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/mac/EventSenderProxy.mm: Added.
      (WTR::buildModifierFlags):
      (WTR::EventSenderProxy::keyDown):
      
      LayoutTests:
      
      Unskip passed tests for Mac.
      
      Patch by Chang Shu <cshu@webkit.org> on 2011-09-13
      Reviewed by Darin Adler.
      
      * platform/mac-wk2/Skipped:
      * platform/qt-wk2/Skipped:
      * platform/win-wk2/Skipped:
      * platform/wk2/Skipped:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1c00c3e3
  24. 18 Aug, 2011 1 commit
    • tony@chromium.org's avatar
      add embedded png checksums to WebKitTestRunner · 112cf2dc
      tony@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=66494
      
      Looks like WebKitTestRunner has never supported embedded checksums.  This copies
      some code from DRT and adds it to the WebKitTestRunner.
      
      Reviewed by Darin Adler.
      
      * WebKitTestRunner/CyclicRedundancyCheck.cpp: Copied from Tools/DumpRenderTree
      * WebKitTestRunner/CyclicRedundancyCheck.h: Copied from Tools/DumpRenderTree
      * WebKitTestRunner/GNUmakefile.am: Add new files
      * WebKitTestRunner/PixelDumpSupport.cpp: Copied from Tools/DumpRenderTree
      * WebKitTestRunner/PixelDumpSupport.h: Copied from Tools/DumpRenderTree
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Add new files
      * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
      (WTR::dumpBitmap): Refactor to use PixelDumpSupport.
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
      * WebKitTestRunner/cg/TestInvocationCG.cpp:
      (WTR::dumpBitmap): Refactor to use PixelDumpSupport.
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
      * WebKitTestRunner/win/WebKitTestRunner.vcproj: Add new files
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@93355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      112cf2dc
  25. 22 Jun, 2011 1 commit
    • dominicc@chromium.org's avatar
      2011-06-22 Dominic Cooney <dominicc@chromium.org> · 3a1ab60a
      dominicc@chromium.org authored
              Reviewed by Mark Rowe.
      
              Add window.internals to WebKit2's WebKitTestRunner.
              https://bugs.webkit.org/show_bug.cgi?id=61073
      
              * platform/mac-wk2/Skipped: unskip fast/harness/internals-object.html
      2011-06-22  Dominic Cooney  <dominicc@chromium.org>
      
              Reviewed by Mark Rowe.
      
              Add window.internals to WebKit2's WebKitTestRunner.
              https://bugs.webkit.org/show_bug.cgi?id=61073
      
              * Configurations/WebCoreTestSupport.xcconfig:
              * WebCore.xcodeproj/project.pbxproj:
      2011-06-22  Dominic Cooney  <dominicc@chromium.org>
      
              Reviewed by Mark Rowe.
      
              Add window.internals to WebKit2's WebKitTestRunner.
              https://bugs.webkit.org/show_bug.cgi?id=61073
      
              * WebKit.vcproj/WebKit.sln: InjectedBundle depends on WebCoreTestSupport
      2011-06-22  Dominic Cooney  <dominicc@chromium.org>
      
              Reviewed by Mark Rowe.
      
              Add window.internals to WebKit2's WebKitTestRunner.
              https://bugs.webkit.org/show_bug.cgi?id=61073
      
              * DumpRenderTree/DumpRenderTree.xcodeproj/project.pxbproj:
              * WebKitTestRunner/Configurations/Base.xcconfig:
              * WebKitTestRunner/Configurations/InjectedBundleCFLite.vsprops:
              * WebKitTestRunner/Configurations/InjectedBundleCommon.vsprops:
              * WebKitTestRunner/Configurations/InjectedBundleCoreFoundation.vsprops:
              * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
              (WTR::InjectedBundlePage::didClearWindowForFrame):
              * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
              * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@89530 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a1ab60a
  26. 13 Jun, 2011 1 commit
  27. 12 Jun, 2011 1 commit
  28. 29 Apr, 2011 1 commit
  29. 28 Apr, 2011 2 commits
  30. 18 Mar, 2011 2 commits
    • mitz@apple.com's avatar
      Revised build fix for r81135. · 2891bb0a
      mitz@apple.com authored
      * WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2891bb0a
    • weinig@apple.com's avatar
      2011-03-18 Sam Weinig <sam@webkit.org> · 40a95331
      weinig@apple.com authored
              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.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      40a95331
  31. 14 Mar, 2011 1 commit
    • kbalazs@webkit.org's avatar
      2011-03-14 Balazs Kelemen <kbalazs@webkit.org> · 38955ed6
      kbalazs@webkit.org authored
              Reviewed by Adam Roben.
      
              [Qt][WK2]Unbreak InjectedBundle on Qt
              https://bugs.webkit.org/show_bug.cgi?id=54109
      
              No code changes so no new tests.
      
              Revert the changes that were needed to use KURL
              in WebKitTestRunner.
      
              * Configurations/WebCore.xcconfig:
              * WebCore.exp.in:
      2011-03-14  Balazs Kelemen  <kbalazs@webkit.org>
      
              Reviewed by Adam Roben.
      
              [Qt][WK2]Unbreak InjectedBundle on Qt
              https://bugs.webkit.org/show_bug.cgi?id=54109
      
              Add API's to WKURL and WKString to satisfy
              WebKitTestRunner's needs.
      
              * Shared/API/c/WKString.cpp:
              (WKStringIsEqualToUTF8CStringIgnoringCase):
              * Shared/API/c/WKString.h:
              * Shared/API/c/WKURL.cpp:
              (WKURLCopyHostName):
              (WKURLCopyScheme):
              * Shared/API/c/WKURL.h:
              * Shared/WebString.h:
              (WebKit::WebString::equalToUTF8StringIgnoringCase):
              * Shared/WebURL.h: Added OwnPtr<KURL> member to be able
              to lazily parse the URL and store the result.
              (WebKit::WebURL::host):
              (WebKit::WebURL::protocol):
              (WebKit::WebURL::parseURLIfNecessary):
              * win/WebKit2.def: Revert the symbol exports that were
              needed to use KURL in WebKitTestRunner.
      2011-03-14  Balazs Kelemen  <kbalazs@webkit.org>
      
              Reviewed by Adam Roben.
      
              [Qt][WK2]Unbreak InjectedBundle on Qt
              https://bugs.webkit.org/show_bug.cgi?id=54109
      
              * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
              (WTR::InjectedBundlePage::willSendRequestForFrame): Use new WebKit2
              API's instead of KURL to analyze the URL.
              * WebKitTestRunner/StringFunctions.h:
              (WTR::adoptWK): Moved from InjectedBundlePage.cpp to make it available globally
              in the WebKitTestRunner project.
              (WTR::toWK): Use adoptWK.
              (WTR::operator<<): Added helper for printing a WKURL.
              * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Do not link
              against WebCore.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38955ed6
  32. 24 Feb, 2011 1 commit
    • weinig@apple.com's avatar
      Add basic pixel testing support to WebKitTestRunner · 3f98da78
      weinig@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=55161
      
      Reviewed by Darin Adler.
      
      * Scripts/old-run-webkit-tests:
      Don't print color space information when using WebKitTestRunner since
      we don't need to change the screen.
      
      * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
      (WTR::InjectedBundle::initialize):
      Add call to initializePlatformDefaults.
              
      (WTR::InjectedBundle::done):
      Return a dictionary on completion with both the text output and pixel dump override.
      
      * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
      Add declaration for initializePlatformDefaults.
      
      * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
      (WTR::LayoutTestController::LayoutTestController):
      (WTR::LayoutTestController::dumpAsText):
      * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
      (WTR::LayoutTestController::shouldDumpPixels):
      Make setting dumpAsText override the dump pixels preference.
      
      * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm: Added.
      (WTR::InjectedBundle::initializePlatformDefaults):
      Set platform defaults matching DumpRenderTree.
      
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp: Added.
      (WTR::InjectedBundle::initializePlatformDefaults):
      * WebKitTestRunner/InjectedBundle/win/InjectedBundleWin.cpp: Added.
      (WTR::InjectedBundle::initializePlatformDefaults):
      Add stubs for initializePlatformDefaults.
      
      * WebKitTestRunner/TestController.cpp:
      (WTR::TestController::runTest):
      (WTR::TestController::runTestingServerLoop):
      (WTR::TestController::run):
      Parse expected pixel results out of stdin and setup the invocation with it.
      
      * WebKitTestRunner/TestInvocation.cpp:
      (WTR::TestInvocation::TestInvocation):
      Initialize new members.
      
      (WTR::TestInvocation::~TestInvocation):
      (WTR::TestInvocation::setIsPixelTest):
      (WTR::sizeWebViewForCurrentTest):
      (WTR::TestInvocation::invoke):
      (WTR::TestInvocation::dump):
      (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
      * WebKitTestRunner/TestInvocation.h:
      Dump pixels in addition to text by calling dumpPixelsAndCompareWithExpected.
      
      * WebKitTestRunner/mac/PlatformWebViewMac.mm:
      (WTR::PlatformWebView::PlatformWebView):
      Use -[NSColorSpace genericRGBColorSpace] instead of the main screen color space.
      
      * WebKitTestRunner/mac/TestInvocationMac.mm: Added.
      (WTR::createCGContextFromPlatformView):
      (WTR::computeMD5HashStringForContext):
      (WTR::dumpBitmap):
      (WTR::forceRepaintFunction):
      (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
      Add mac specific pixel dumping support. Right now, we always pull pixels
      from the window server.
      
      * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
      * WebKitTestRunner/InjectedBundle/qt/InjectedBundle.pro:
      * WebKitTestRunner/qt/WebKitTestRunner.pro:
      * WebKitTestRunner/win/InjectedBundle.vcproj:
      * WebKitTestRunner/win/WebKitTestRunner.vcproj:
      Add new files.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@79612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3f98da78
  33. 07 Feb, 2011 3 commits