Changeset 142109 in webkit


Ignore:
Timestamp:
Feb 7, 2013 6:20:04 AM (11 years ago)
Author:
gavinp@chromium.org
Message:

Unreviewed, rolling out r142090.
http://trac.webkit.org/changeset/142090
https://bugs.webkit.org/show_bug.cgi?id=108466

lots of selection expectations failures

  • DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
  • DumpRenderTree/DumpRenderTree.gypi:
  • DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
  • DumpRenderTree/chromium/TestRunner/public/WebTask.h:

(WebTaskList):

  • DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Removed.
  • DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:

(WebTestInterfaces):

  • DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:

(WebTestProxyBase):

  • DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:

(WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
(WebTestRunner::AccessibilityUIElementList::getOrCreate):
(WebTestRunner::AccessibilityUIElementList::createRoot):

  • DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:

(AccessibilityUIElementList):

  • DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:

(WebTestRunner::CppBoundClass::~CppBoundClass):
(WebTestRunner::CppBoundClass::invoke):
(WebTestRunner::CppBoundClass::getProperty):
(WebTestRunner::CppBoundClass::setProperty):
(WebTestRunner::CppBoundClass::bindCallback):
(WebTestRunner::CppBoundClass::bindGetterCallback):
(WebTestRunner::CppBoundClass::bindProperty):
(WebTestRunner::CppBoundClass::getAsCppVariant):

  • DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:

(WebTestRunner):
(CppBoundClass):
(WebTestRunner::CppBoundClass::bindProperty):
(WebTestRunner::CppBoundClass::bindFallbackCallback):
(WebTestRunner::CppBoundClass::bindFallbackMethod):

  • DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:

(WebTestRunner::CppVariant::toString):
(WebTestRunner::CppVariant::toInt32):
(WebTestRunner::CppVariant::toDouble):
(WebTestRunner::CppVariant::toBoolean):
(WebTestRunner::CppVariant::toStringVector):
(WebTestRunner::CppVariant::invoke):
(WebTestRunner::CppVariant::invokeDefault):

  • DumpRenderTree/chromium/TestRunner/src/CppVariant.h:

(CppVariant):

  • DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:

(WebTestRunner):
(WebTestRunner::EventSender::EventSender):
(WebTestRunner::EventSender::reset):
(WebTestRunner::EventSender::mouseDown):
(WebTestRunner::EventSender::mouseUp):
(WebTestRunner::EventSender::mouseMoveTo):
(WebTestRunner::EventSender::keyDown):
(WebTestRunner::EventSender::dispatchMessage):
(WebTestRunner::EventSender::leapForward):
(WebTestRunner::EventSender::replaySavedEvents):
(WebTestRunner::makeMenuItemStringsFor):
(WebTestRunner::EventSender::contextClick):
(WebTestRunner::EventSender::beginDragWithFiles):
(WebTestRunner::EventSender::addTouchPoint):
(WebTestRunner::EventSender::releaseTouchPoint):
(WebTestRunner::EventSender::updateTouchPoint):
(WebTestRunner::EventSender::cancelTouchPoint):
(WebTestRunner::EventSender::sendCurrentTouchEvent):
(WebTestRunner::EventSender::gestureEvent):

  • DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:

(WebTestRunner::NativeKeyCodeForWindowsKeyCode):

  • DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:

(MockGrammarCheck::checkGrammarOfString):

  • DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:

(MockGrammarCheck):

  • DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:

(append):
(isNotASCIIAlpha):
(MockSpellCheck::spellCheckWord):
(MockSpellCheck::initializeIfNeeded):

  • DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:

(MockSpellCheck):

  • DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:

(WebTestRunner::SpellCheckClient::checkTextOfParagraph):
(WebTestRunner::SpellCheckClient::finishLastTextCheck):

  • DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Removed.
  • DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:

(WebTestRunner::TestInterfaces::TestInterfaces):

  • DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:

(TestInterfaces):

  • DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:

(WebTestRunner::TestPlugin::TestPlugin):
(WebTestRunner::TestPlugin::initialize):
(WebTestRunner::TestPlugin::destroy):
(WebTestRunner::TestPlugin::parsePrimitive):
(WebTestRunner::TestPlugin::parseColor):
(WebTestRunner::TestPlugin::initProgram):
(WebTestRunner::TestPlugin::initPrimitive):
(WebTestRunner::TestPlugin::drawPrimitive):
(WebTestRunner::TestPlugin::loadShader):
(WebTestRunner::TestPlugin::loadProgram):
(WebTestRunner::TestPlugin::handleDragStatusUpdate):

  • DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:

(TestPlugin):

  • DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:

(WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
(WebTestRunner::TestRunner::WorkQueue::processWork):
(WebTestRunner::TestRunner::WorkQueue::reset):
(WebTestRunner::TestRunner::WorkQueue::addWork):
(WebTestRunner::TestRunner::TestRunner):
(WebTestRunner::TestRunner::reset):
(WebTestRunner::TestRunner::policyDelegateDone):
(WebTestRunner::TestRunner::findString):
(WebTestRunner::TestRunner::setTextSubpixelPositioning):
(WebTestRunner::TestRunner::overridePreference):
(WebTestRunner):
(WebTestRunner::TestRunner::setBackingScaleFactor):

  • DumpRenderTree/chromium/TestRunner/src/TestRunner.h:

(WebTestRunner::TestRunner::WorkQueue::isEmpty):
(TestRunner):

  • DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:

(WebTestRunner::TextInputController::markedRange):
(WebTestRunner::TextInputController::selectedRange):
(WebTestRunner::TextInputController::firstRectForCharacterRange):

  • DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:

(WebTestRunner::WebPreferences::reset):

  • DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:

(WebTestRunner):
(WebTestRunner::WebTaskList::WebTaskList):
(WebTestRunner::WebTaskList::~WebTaskList):
(WebTestRunner::WebTaskList::registerTask):
(WebTestRunner::WebTaskList::unregisterTask):
(WebTestRunner::WebTaskList::revokeAll):

  • DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:

(WebTestRunner::WebTestInterfaces::WebTestInterfaces):
(WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
(WebTestRunner::WebTestInterfaces::testInterfaces):

  • DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:

(WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
(WebTestRunner::WebTestProxyBase::spellCheckClient):
(WebTestRunner::WebTestProxyBase::registerIntentService):
(WebTestRunner::WebTestProxyBase::dispatchIntent):
(WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):

  • DumpRenderTree/chromium/TestRunner/src/config.h: Removed.
Location:
trunk/Tools
Files:
3 deleted
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r142090 r142109  
     12013-02-07  Gavin Peters  <gavinp@chromium.org>
     2
     3        Unreviewed, rolling out r142090.
     4        http://trac.webkit.org/changeset/142090
     5        https://bugs.webkit.org/show_bug.cgi?id=108466
     6
     7        lots of selection expectations failures
     8
     9        * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
     10        * DumpRenderTree/DumpRenderTree.gypi:
     11        * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
     12        * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
     13        (WebTaskList):
     14        * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Removed.
     15        * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
     16        (WebTestInterfaces):
     17        * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
     18        (WebTestProxyBase):
     19        * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
     20        (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
     21        (WebTestRunner::AccessibilityUIElementList::getOrCreate):
     22        (WebTestRunner::AccessibilityUIElementList::createRoot):
     23        * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
     24        (AccessibilityUIElementList):
     25        * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
     26        (WebTestRunner::CppBoundClass::~CppBoundClass):
     27        (WebTestRunner::CppBoundClass::invoke):
     28        (WebTestRunner::CppBoundClass::getProperty):
     29        (WebTestRunner::CppBoundClass::setProperty):
     30        (WebTestRunner::CppBoundClass::bindCallback):
     31        (WebTestRunner::CppBoundClass::bindGetterCallback):
     32        (WebTestRunner::CppBoundClass::bindProperty):
     33        (WebTestRunner::CppBoundClass::getAsCppVariant):
     34        * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
     35        (WebTestRunner):
     36        (CppBoundClass):
     37        (WebTestRunner::CppBoundClass::bindProperty):
     38        (WebTestRunner::CppBoundClass::bindFallbackCallback):
     39        (WebTestRunner::CppBoundClass::bindFallbackMethod):
     40        * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
     41        (WebTestRunner::CppVariant::toString):
     42        (WebTestRunner::CppVariant::toInt32):
     43        (WebTestRunner::CppVariant::toDouble):
     44        (WebTestRunner::CppVariant::toBoolean):
     45        (WebTestRunner::CppVariant::toStringVector):
     46        (WebTestRunner::CppVariant::invoke):
     47        (WebTestRunner::CppVariant::invokeDefault):
     48        * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
     49        (CppVariant):
     50        * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
     51        (WebTestRunner):
     52        (WebTestRunner::EventSender::EventSender):
     53        (WebTestRunner::EventSender::reset):
     54        (WebTestRunner::EventSender::mouseDown):
     55        (WebTestRunner::EventSender::mouseUp):
     56        (WebTestRunner::EventSender::mouseMoveTo):
     57        (WebTestRunner::EventSender::keyDown):
     58        (WebTestRunner::EventSender::dispatchMessage):
     59        (WebTestRunner::EventSender::leapForward):
     60        (WebTestRunner::EventSender::replaySavedEvents):
     61        (WebTestRunner::makeMenuItemStringsFor):
     62        (WebTestRunner::EventSender::contextClick):
     63        (WebTestRunner::EventSender::beginDragWithFiles):
     64        (WebTestRunner::EventSender::addTouchPoint):
     65        (WebTestRunner::EventSender::releaseTouchPoint):
     66        (WebTestRunner::EventSender::updateTouchPoint):
     67        (WebTestRunner::EventSender::cancelTouchPoint):
     68        (WebTestRunner::EventSender::sendCurrentTouchEvent):
     69        (WebTestRunner::EventSender::gestureEvent):
     70        * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
     71        (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
     72        * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
     73        (MockGrammarCheck::checkGrammarOfString):
     74        * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
     75        (MockGrammarCheck):
     76        * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
     77        (append):
     78        (isNotASCIIAlpha):
     79        (MockSpellCheck::spellCheckWord):
     80        (MockSpellCheck::initializeIfNeeded):
     81        * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
     82        (MockSpellCheck):
     83        * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
     84        (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
     85        (WebTestRunner::SpellCheckClient::finishLastTextCheck):
     86        * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Removed.
     87        * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
     88        (WebTestRunner::TestInterfaces::TestInterfaces):
     89        * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
     90        (TestInterfaces):
     91        * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
     92        (WebTestRunner::TestPlugin::TestPlugin):
     93        (WebTestRunner::TestPlugin::initialize):
     94        (WebTestRunner::TestPlugin::destroy):
     95        (WebTestRunner::TestPlugin::parsePrimitive):
     96        (WebTestRunner::TestPlugin::parseColor):
     97        (WebTestRunner::TestPlugin::initProgram):
     98        (WebTestRunner::TestPlugin::initPrimitive):
     99        (WebTestRunner::TestPlugin::drawPrimitive):
     100        (WebTestRunner::TestPlugin::loadShader):
     101        (WebTestRunner::TestPlugin::loadProgram):
     102        (WebTestRunner::TestPlugin::handleDragStatusUpdate):
     103        * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
     104        (TestPlugin):
     105        * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
     106        (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
     107        (WebTestRunner::TestRunner::WorkQueue::processWork):
     108        (WebTestRunner::TestRunner::WorkQueue::reset):
     109        (WebTestRunner::TestRunner::WorkQueue::addWork):
     110        (WebTestRunner::TestRunner::TestRunner):
     111        (WebTestRunner::TestRunner::reset):
     112        (WebTestRunner::TestRunner::policyDelegateDone):
     113        (WebTestRunner::TestRunner::findString):
     114        (WebTestRunner::TestRunner::setTextSubpixelPositioning):
     115        (WebTestRunner::TestRunner::overridePreference):
     116        (WebTestRunner):
     117        (WebTestRunner::TestRunner::setBackingScaleFactor):
     118        * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
     119        (WebTestRunner::TestRunner::WorkQueue::isEmpty):
     120        (TestRunner):
     121        * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
     122        (WebTestRunner::TextInputController::markedRange):
     123        (WebTestRunner::TextInputController::selectedRange):
     124        (WebTestRunner::TextInputController::firstRectForCharacterRange):
     125        * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
     126        (WebTestRunner::WebPreferences::reset):
     127        * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
     128        (WebTestRunner):
     129        (WebTestRunner::WebTaskList::WebTaskList):
     130        (WebTestRunner::WebTaskList::~WebTaskList):
     131        (WebTestRunner::WebTaskList::registerTask):
     132        (WebTestRunner::WebTaskList::unregisterTask):
     133        (WebTestRunner::WebTaskList::revokeAll):
     134        * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
     135        (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
     136        (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
     137        (WebTestRunner::WebTestInterfaces::testInterfaces):
     138        * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
     139        (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
     140        (WebTestRunner::WebTestProxyBase::spellCheckClient):
     141        (WebTestRunner::WebTestProxyBase::registerIntentService):
     142        (WebTestRunner::WebTestProxyBase::dispatchIntent):
     143        (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
     144        * DumpRenderTree/chromium/TestRunner/src/config.h: Removed.
     145
    11462013-02-07  Jochen Eisinger  <jochen@chromium.org>
    2147
  • trunk/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp

    r142090 r142109  
    8484                'TestRunner_resources',
    8585                '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
     86                '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit_wtf_support',
    8687                '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit_test_support',
     88                '<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',
     89                '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
    8790            ],
    8891            'include_dirs': [
     
    104107            ],
    105108            'conditions': [
    106                 ['inside_chromium_build == 1', {
    107                     'type': '<(component)',
    108                     'conditions': [
    109                         ['component=="shared_library"', {
    110                             'defines': [
    111                                 'WEBTESTRUNNER_DLL',
    112                                 'WEBTESTRUNNER_IMPLEMENTATION=1',
    113                             ],
    114                             'dependencies': [
    115                                 '<(chromium_src_dir)/base/base.gyp:base',
    116                                 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
    117                                 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
    118                             ],
    119                             'direct_dependent_settings': {
    120                                 'defines': [
    121                                     'WEBTESTRUNNER_DLL',
    122                                 ],
    123                             },
    124                             'export_dependent_settings': [
    125                                 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
    126                                 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
    127                             ],
    128                             'msvs_settings': {
    129                                 'VCLinkerTool': {
    130                                     'conditions': [
    131                                         ['incremental_chrome_dll==1', {
    132                                             'UseLibraryDependencyInputs': 'true',
    133                                         }],
    134                                     ],
    135                                 },
    136                             },
    137                         }],
    138                     ],
    139                 }],
    140109                ['toolkit_uses_gtk == 1', {
    141110                    'defines': [
     
    227196                '<(source_dir)/WebKit/chromium/WebKit.gyp:inspector_resources',
    228197                '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
    229                 '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit_wtf_support',
    230198                '<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',
    231199                '<(chromium_src_dir)/base/base.gyp:test_support_base',
  • trunk/Tools/DumpRenderTree/DumpRenderTree.gypi

    r142090 r142109  
    5858            'chromium/TestRunner/public/WebPreferences.h',
    5959            'chromium/TestRunner/public/WebTask.h',
    60             'chromium/TestRunner/public/WebTestCommon.h',
    6160            'chromium/TestRunner/public/WebTestInterfaces.h',
    6261            'chromium/TestRunner/public/WebTestProxy.h',
     
    8281            'chromium/TestRunner/src/SpellCheckClient.cpp',
    8382            'chromium/TestRunner/src/SpellCheckClient.h',
    84             'chromium/TestRunner/src/TestCommon.h',
    8583            'chromium/TestRunner/src/TestInterfaces.cpp',
    8684            'chromium/TestRunner/src/TestInterfaces.h',
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebPreferences.h

    r142090 r142109  
    3535#include "Platform/chromium/public/WebURL.h"
    3636#include "WebKit/chromium/public/WebSettings.h"
    37 #include "WebTestCommon.h"
    3837
    3938namespace WebKit {
     
    4342namespace WebTestRunner {
    4443
    45 struct WEBTESTRUNNER_EXPORT WebPreferences {
     44struct WebPreferences {
    4645    WebKit::WebString standardFontFamily;
    4746    WebKit::WebString fixedFontFamily;
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTask.h

    r142090 r142109  
    3232#define WebTask_h
    3333
    34 #include "WebTestCommon.h"
    35 #include <vector>
    36 
    3734namespace WebTestRunner {
    3835
     
    4138// WebTask represents a task which can run by WebTestDelegate::postTask() or
    4239// WebTestDelegate::postDelayedTask().
    43 class WEBTESTRUNNER_EXPORT WebTask {
     40class WebTask {
    4441public:
    4542    explicit WebTask(WebTaskList*);
     
    5552};
    5653
    57 class WEBTESTRUNNER_EXPORT WebTaskList {
     54class WebTaskList {
    5855public:
    5956    WebTaskList();
     
    6461
    6562private:
    66     std::vector<WebTask*> m_tasks;
     63    class Private;
     64    Private* m_private;
    6765};
    6866
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h

    r142090 r142109  
    3232#define WebTestInterfaces_h
    3333
    34 #include "WebTestCommon.h"
    35 #include <memory>
    36 
    3734namespace WebKit {
    3835class WebFrame;
     
    4643class WebTestRunner;
    4744
    48 class WEBTESTRUNNER_EXPORT WebTestInterfaces {
     45class WebTestInterfaces {
    4946public:
    5047    WebTestInterfaces();
     
    6562
    6663private:
    67     std::auto_ptr<TestInterfaces> m_interfaces;
     64    TestInterfaces* m_interfaces;
    6865};
    6966
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h

    r142090 r142109  
    4343#include "WebKit/chromium/public/WebTextAffinity.h"
    4444#include "WebKit/chromium/public/WebTextDirection.h"
    45 #include "WebTestCommon.h"
    4645#include <map>
    47 #include <memory>
    4846#include <string>
    4947
     
    8280class WebTestRunner;
    8381
    84 class WEBTESTRUNNER_EXPORT WebTestProxyBase {
     82class WebTestProxyBase {
    8583public:
    8684    void setInterfaces(WebTestInterfaces*);
     
    168166    WebTestDelegate* m_delegate;
    169167
    170     std::auto_ptr<SpellCheckClient> m_spellcheck;
     168    SpellCheckClient* m_spellcheck;
    171169
    172170    WebKit::WebRect m_paintRect;
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp

    r142090 r142109  
    3232#include "AccessibilityUIElementChromium.h"
    3333
    34 #include "TestCommon.h"
    3534#include "WebAccessibilityObject.h"
    3635#include <public/WebCString.h>
     
    3837#include <public/WebRect.h>
    3938#include <public/WebString.h>
     39#include <wtf/Assertions.h>
     40#include <wtf/StringExtras.h>
    4041
    4142using namespace WebKit;
     
    368369{
    369370
    370     WEBKIT_ASSERT(factory);
     371    ASSERT(factory);
    371372
    372373    //
     
    10251026
    10261027    AccessibilityUIElement* element = new AccessibilityUIElement(object, this);
    1027     m_elements.push_back(element);
     1028    m_elements.append(element);
    10281029    return element;
    10291030}
     
    10321033{
    10331034    AccessibilityUIElement* element = new RootAccessibilityUIElement(object, this);
    1034     m_elements.push_back(element);
     1035    m_elements.append(element);
    10351036    return element;
    10361037}
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h

    r142090 r142109  
    3535#include "WebAccessibilityObject.h"
    3636#include <vector>
     37#include <wtf/Vector.h>
    3738
    3839namespace WebTestRunner {
     
    168169
    169170private:
    170     typedef std::vector<AccessibilityUIElement*> ElementList;
     171    typedef Vector<AccessibilityUIElement*> ElementList;
    171172    ElementList m_elements;
    172173};
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp

    r142090 r142109  
    4343#include "CppBoundClass.h"
    4444
    45 #include "TestCommon.h"
    4645#include "WebBindings.h"
    4746#include "WebFrame.h"
    48 #include <memory>
    4947#include <public/WebString.h>
     48#include <wtf/Assertions.h>
     49#include <wtf/OwnPtr.h>
    5050
    5151using namespace WebKit;
     
    7878class GetterPropertyCallback : public CppBoundClass::PropertyCallback {
    7979public:
    80     GetterPropertyCallback(auto_ptr<CppBoundClass::GetterCallback> callback)
     80    GetterPropertyCallback(PassOwnPtr<CppBoundClass::GetterCallback> callback)
    8181        : m_callback(callback)
    8282    {
     
    9292
    9393private:
    94     auto_ptr<CppBoundClass::GetterCallback> m_callback;
     94    OwnPtr<CppBoundClass::GetterCallback> m_callback;
    9595};
    9696
     
    210210{
    211211    for (MethodList::iterator i = m_methods.begin(); i != m_methods.end(); ++i)
    212         delete i->second;
     212        delete i->value;
    213213
    214214    for (PropertyList::iterator i = m_properties.begin(); i != m_properties.end(); ++i)
    215         delete i->second;
     215        delete i->value;
    216216
    217217    // Unregister ourselves if we were bound to a frame.
     
    244244        callback = m_fallbackCallback.get();
    245245    } else
    246         callback = (*method).second;
     246        callback = (*method).value;
    247247
    248248    // Build a CppArgumentList argument vector from the NPVariants coming in.
     
    267267
    268268    CppVariant cppValue;
    269     if (!callback->second->getValue(&cppValue))
     269    if (!callback->value->getValue(&cppValue))
    270270        return false;
    271271    cppValue.copyToNPVariant(result);
     
    281281    CppVariant cppValue;
    282282    cppValue.set(*value);
    283     return (*callback).second->setValue(cppValue);
     283    return (*callback).value->setValue(cppValue);
    284284}
    285285
     
    289289    MethodList::iterator oldCallback = m_methods.find(ident);
    290290    if (oldCallback != m_methods.end()) {
    291         delete oldCallback->second;
     291        delete oldCallback->value;
    292292        if (!callback) {
    293             m_methods.erase(oldCallback);
     293            m_methods.remove(oldCallback);
    294294            return;
    295295        }
    296296    }
    297297
    298     m_methods[ident] = callback;
    299 }
    300 
    301 void CppBoundClass::bindGetterCallback(const string& name, auto_ptr<GetterCallback> callback)
    302 {
    303     PropertyCallback* propertyCallback = callback.get() ? new GetterPropertyCallback(callback) : 0;
     298    m_methods.set(ident, callback);
     299}
     300
     301void CppBoundClass::bindGetterCallback(const string& name, PassOwnPtr<GetterCallback> callback)
     302{
     303    PropertyCallback* propertyCallback = callback ? new GetterPropertyCallback(callback) : 0;
    304304    bindProperty(name, propertyCallback);
    305305}
     
    316316    PropertyList::iterator oldCallback = m_properties.find(ident);
    317317    if (oldCallback != m_properties.end()) {
    318         delete oldCallback->second;
     318        delete oldCallback->value;
    319319        if (!callback) {
    320             m_properties.erase(oldCallback);
     320            m_properties.remove(oldCallback);
    321321            return;
    322322        }
    323323    }
    324324
    325     m_properties[ident] = callback;
     325    m_properties.set(ident, callback);
    326326}
    327327
     
    345345        WebBindings::releaseObject(npObj); // CppVariant takes the reference.
    346346    }
    347     WEBKIT_ASSERT(m_selfVariant.isObject());
     347    ASSERT(m_selfVariant.isObject());
    348348    return &m_selfVariant;
    349349}
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h

    r142090 r142109  
    4545
    4646#include "CppVariant.h"
    47 #include <map>
    48 #include <memory>
    49 #include <vector>
     47#include <wtf/HashMap.h>
     48#include <wtf/Noncopyable.h>
     49#include <wtf/OwnPtr.h>
     50#include <wtf/PassOwnPtr.h>
     51#include <wtf/Vector.h>
    5052
    5153namespace WebKit {
     
    5658namespace WebTestRunner {
    5759
    58 typedef std::vector<CppVariant> CppArgumentList;
     60typedef Vector<CppVariant> CppArgumentList;
    5961
    6062// CppBoundClass lets you map Javascript method calls and property accesses
    6163// directly to C++ method calls and CppVariant* variable access.
    6264class CppBoundClass {
     65    WTF_MAKE_NONCOPYABLE(CppBoundClass);
    6366public:
    6467    class PropertyCallback {
     
    162165    // Bind Javascript property |name| to the C++ getter callback |callback|.
    163166    // This can be used to create read-only properties.
    164     void bindGetterCallback(const std::string&, std::auto_ptr<GetterCallback>);
     167    void bindGetterCallback(const std::string&, PassOwnPtr<GetterCallback>);
    165168
    166169    // A wrapper for BindGetterCallback, to simplify the common case of binding a
     
    170173    void bindProperty(const std::string& name, void (T::*method)(CppVariant*))
    171174    {
    172         std::auto_ptr<GetterCallback> callback(new MemberGetterCallback<T>(static_cast<T*>(this), method));
    173         bindGetterCallback(name, callback);
     175        OwnPtr<GetterCallback> callback = adoptPtr(new MemberGetterCallback<T>(static_cast<T*>(this), method));
     176        bindGetterCallback(name, callback.release());
    174177    }
    175178
     
    191194    // fallback always returns true when checked for a method's
    192195    // existence).
    193     void bindFallbackCallback(std::auto_ptr<Callback> fallbackCallback)
     196    void bindFallbackCallback(PassOwnPtr<Callback> fallbackCallback)
    194197    {
    195198        m_fallbackCallback = fallbackCallback;
     
    203206    void bindFallbackMethod(void (T::*method)(const CppArgumentList&, CppVariant*))
    204207    {
    205         if (method)
    206             bindFallbackCallback(std::auto_ptr<Callback>(new MemberCallback<T>(static_cast<T*>(this), method)));
    207         else
    208             bindFallbackCallback(std::auto_ptr<Callback>());
     208        if (method) {
     209            OwnPtr<Callback> callback = adoptPtr(new MemberCallback<T>(static_cast<T*>(this), method));
     210            bindFallbackCallback(callback.release());
     211        } else
     212            bindFallbackCallback(nullptr);
    209213    }
    210214
     
    212216    // but otherwise they should be considered private.
    213217
    214     typedef std::map<NPIdentifier, PropertyCallback*> PropertyList;
    215     typedef std::map<NPIdentifier, Callback*> MethodList;
     218    typedef HashMap<NPIdentifier, PropertyCallback*> PropertyList;
     219    typedef HashMap<NPIdentifier, Callback*> MethodList;
    216220    // These maps associate names with property and method pointers to be
    217221    // exposed to JavaScript.
     
    220224
    221225    // The callback gets invoked when a call is made to an nonexistent method.
    222     std::auto_ptr<Callback> m_fallbackCallback;
     226    OwnPtr<Callback> m_fallbackCallback;
    223227
    224228private:
     
    239243    // be unregistered with V8 when we delete it.
    240244    bool m_boundToFrame;
    241 
    242 private:
    243     CppBoundClass(CppBoundClass&);
    244     CppBoundClass& operator=(const CppBoundClass&);
    245245};
    246246
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp

    r142090 r142109  
    3232#include "CppVariant.h"
    3333
    34 #include "TestCommon.h"
    3534#include "WebBindings.h"
    3635#include <limits>
     36#include <wtf/Assertions.h>
     37#include <wtf/StringExtras.h>
    3738
    3839using namespace WebKit;
     
    220221string CppVariant::toString() const
    221222{
    222     WEBKIT_ASSERT(isString());
     223    ASSERT(isString());
    223224    return string(value.stringValue.UTF8Characters,
    224225                  value.stringValue.UTF8Length);
     
    231232    if (isDouble())
    232233        return static_cast<int32_t>(value.doubleValue);
    233     WEBKIT_ASSERT_NOT_REACHED();
     234    ASSERT_NOT_REACHED();
    234235    return 0;
    235236}
     
    241242    if (isDouble())
    242243        return value.doubleValue;
    243     WEBKIT_ASSERT_NOT_REACHED();
     244    ASSERT_NOT_REACHED();
    244245    return 0;
    245246}
     
    247248bool CppVariant::toBoolean() const
    248249{
    249     WEBKIT_ASSERT(isBool());
     250    ASSERT(isBool());
    250251    return value.boolValue;
    251252}
    252253
    253 vector<string> CppVariant::toStringVector() const
    254 {
    255 
    256     WEBKIT_ASSERT(isObject());
    257     vector<string> stringVector;
     254Vector<string> CppVariant::toStringVector() const
     255{
     256
     257    ASSERT(isObject());
     258    Vector<string> stringVector;
    258259    NPObject* npValue = value.objectValue;
    259260    NPIdentifier lengthId = WebBindings::getStringIdentifier("length");
     
    290291            string item(NPVARIANT_TO_STRING(indexValue).UTF8Characters,
    291292                        NPVARIANT_TO_STRING(indexValue).UTF8Length);
    292             stringVector.push_back(item);
     293            stringVector.append(item);
    293294        }
    294295        WebBindings::releaseVariantValue(&indexValue);
     
    300301                        uint32_t argumentCount, CppVariant& result) const
    301302{
    302     WEBKIT_ASSERT(isObject());
     303    ASSERT(isObject());
    303304    NPIdentifier methodName = WebBindings::getStringIdentifier(method.c_str());
    304305    NPObject* npObject = value.objectValue;
     
    314315                               CppVariant& result) const
    315316{
    316     WEBKIT_ASSERT(isObject());
     317    ASSERT(isObject());
    317318    NPObject* npObject = value.objectValue;
    318319    NPVariant r;
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h

    r142090 r142109  
    4545#include "WebBindings.h"
    4646#include <string>
    47 #include <vector>
     47#include <wtf/Vector.h>
    4848
    4949namespace WebTestRunner {
     
    121121    // Returns a vector of strings for the specified argument. This is useful
    122122    // for converting a JavaScript array of strings into a vector of strings.
    123     std::vector<std::string> toStringVector() const;
     123    Vector<std::string> toStringVector() const;
    124124
    125125    // Invoke method of the given name on an object with the supplied arguments.
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp

    r142090 r142109  
    4646#include "KeyCodeMapping.h"
    4747#include "MockSpellCheck.h"
    48 #include "TestCommon.h"
    4948#include "WebContextMenuData.h"
    5049#include "WebDragOperation.h"
     
    5251#include "WebTouchPoint.h"
    5352#include "WebView.h"
    54 #include <deque>
    5553#include <public/WebDragData.h>
    5654#include <public/WebPoint.h>
    5755#include <public/WebString.h>
    5856#include <public/WebVector.h>
    59 
    60 #ifdef WIN32
     57#include <wtf/Deque.h>
     58#include <wtf/StringExtras.h>
     59
     60#if OS(WINDOWS)
    6161#include "win/WebInputEventFactory.h"
    6262#endif
     
    9898WebDragOperationsMask currentDragEffectsAllowed;
    9999bool replayingSavedEvents = false;
    100 deque<SavedEvent> mouseEventQueue;
     100Deque<SavedEvent> mouseEventQueue;
    101101int touchModifiers;
    102 vector<WebTouchPoint> touchPoints;
     102Vector<WebTouchPoint> touchPoints;
    103103
    104104// Time and place of the last mouse up event.
     
    156156    const char* characters = modifierName.c_str();
    157157    if (!strcmp(characters, "ctrlKey")
    158 #ifndef __APPLE__
     158#if !OS(MAC_OS_X)
    159159        || !strcmp(characters, "addSelectionKey")
    160160#endif
     
    165165    else if (!strcmp(characters, "altKey")) {
    166166        event->modifiers |= WebInputEvent::AltKey;
    167 #ifndef __APPLE__
     167#if !OS(MAC_OS_X)
    168168        // On Windows all keys with Alt modifier will be marked as system key.
    169169        // We keep the same behavior on Linux and everywhere non-Mac, see:
     
    173173        isSystemKey = true;
    174174#endif
    175 #ifdef __APPLE__
     175#if OS(MAC_OS_X)
     176    } else if (!strcmp(characters, "metaKey") || !strcmp(characters, "addSelectionKey")) {
    176177        event->modifiers |= WebInputEvent::MetaKey;
    177178        // On Mac only command key presses are marked as system key.
     
    191192    bool isSystemKey = false;
    192193    if (argument->isObject()) {
    193         vector<string> modifiers = argument->toStringVector();
    194         for (vector<string>::const_iterator i = modifiers.begin(); i != modifiers.end(); ++i)
     194        Vector<string> modifiers = argument->toStringVector();
     195        for (Vector<string>::const_iterator i = modifiers.begin(); i != modifiers.end(); ++i)
    195196            isSystemKey |= applyKeyModifier(*i, event);
    196197    } else if (argument->isString())
     
    204205bool getEditCommand(const WebKeyboardEvent& event, string* name)
    205206{
    206 #ifdef __APPLE__
     207#if OS(MAC_OS_X)
    207208    // We only cares about Left,Right,Up,Down keys with Command or Command+Shift
    208209    // modifiers. These key events correspond to some special movement and
     
    307308    // events so we can simulate drag & drop.
    308309    bindProperty("dragMode", &dragMode);
    309 #ifdef WIN32
     310#if OS(WINDOWS)
    310311    bindProperty("WM_KEYDOWN", &wmKeyDown);
    311312    bindProperty("WM_KEYUP", &wmKeyUp);
     
    322323{
    323324    // The test should have finished a drag and the mouse button state.
    324     WEBKIT_ASSERT(currentDragData.isNull());
     325    ASSERT(currentDragData.isNull());
    325326    currentDragData.reset();
    326327    currentDragEffect = WebKit::WebDragOperationNone;
     
    328329    pressedButton = WebMouseEvent::ButtonNone;
    329330    dragMode.set(true);
    330 #ifdef WIN32
     331#if OS(WINDOWS)
    331332    wmKeyDown.set(WM_KEYDOWN);
    332333    wmKeyUp.set(WM_KEYUP);
     
    418419
    419420    int buttonNumber = getButtonNumberFromSingleArg(arguments);
    420     WEBKIT_ASSERT(buttonNumber != -1);
     421    ASSERT(buttonNumber != -1);
    421422
    422423    WebMouseEvent::Button buttonType = getButtonTypeFromButtonNumber(buttonNumber);
     
    440441
    441442    int buttonNumber = getButtonNumberFromSingleArg(arguments);
    442     WEBKIT_ASSERT(buttonNumber != -1);
     443    ASSERT(buttonNumber != -1);
    443444
    444445    WebMouseEvent::Button buttonType = getButtonTypeFromButtonNumber(buttonNumber);
     
    448449        savedEvent.type = SavedEvent::MouseUp;
    449450        savedEvent.buttonType = buttonType;
    450         mouseEventQueue.push_back(savedEvent);
     451        mouseEventQueue.append(savedEvent);
    451452        replaySavedEvents();
    452453    } else {
     
    505506        savedEvent.type = SavedEvent::MouseMove;
    506507        savedEvent.pos = mousePos;
    507         mouseEventQueue.push_back(savedEvent);
     508        mouseEventQueue.append(savedEvent);
    508509    } else {
    509510        WebMouseEvent event;
     
    598599        if (!code) {
    599600            WebString webCodeStr = WebString::fromUTF8(codeStr.data(), codeStr.size());
    600             WEBKIT_ASSERT(webCodeStr.length() == 1);
     601            ASSERT(webCodeStr.length() == 1);
    601602            text = code = webCodeStr.data()[0];
    602603            needsShiftKeyModifier = needsShiftModifier(code);
     
    616617    eventDown.modifiers = 0;
    617618    eventDown.windowsKeyCode = code;
    618 #if defined(__linux__) && USE(GTK)
     619#if OS(LINUX) && USE(GTK)
    619620    eventDown.nativeKeyCode = NativeKeyCodeForWindowsKeyCode(code);
    620621#endif
     
    678679    result->setNull();
    679680
    680 #ifdef WIN32
     681#if OS(WINDOWS)
    681682    if (arguments.size() == 3) {
    682683        // Grab the message id to see if we need to dispatch it.
     
    694695        webview()->handleInputEvent(WebInputEventFactory::keyboardEvent(0, msg, arguments[1].toInt32(), lparam));
    695696    } else
    696         WEBKIT_ASSERT_NOT_REACHED();
     697        ASSERT_NOT_REACHED();
    697698#endif
    698699}
     
    718719        savedEvent.type = SavedEvent::LeapForward;
    719720        savedEvent.milliseconds = milliseconds;
    720         mouseEventQueue.push_back(savedEvent);
     721        mouseEventQueue.append(savedEvent);
    721722    } else
    722723        doLeapForward(milliseconds);
     
    779780{
    780781    replayingSavedEvents = true;
    781     while (!mouseEventQueue.empty()) {
    782         SavedEvent e = mouseEventQueue.front();
    783         mouseEventQueue.pop_front();
     782    while (!mouseEventQueue.isEmpty()) {
     783        SavedEvent e = mouseEventQueue.takeFirst();
    784784
    785785        switch (e.type) {
     
    800800        }
    801801        default:
    802             WEBKIT_ASSERT_NOT_REACHED();
     802            ASSERT_NOT_REACHED();
    803803        }
    804804    }
     
    814814// - Some test even checks actual string content. So providing it would be also helpful.
    815815//
    816 static vector<WebString> makeMenuItemStringsFor(WebContextMenuData* contextMenu, WebTestDelegate* delegate)
     816static Vector<WebString> makeMenuItemStringsFor(WebContextMenuData* contextMenu, WebTestDelegate* delegate)
    817817{
    818818    // These constants are based on Safari's context menu because tests are made for it.
     
    822822    // This is possible because mouse events are cancelleable.
    823823    if (!contextMenu)
    824         return vector<WebString>();
    825 
    826     vector<WebString> strings;
     824        return Vector<WebString>();
     825
     826    Vector<WebString> strings;
    827827
    828828    if (contextMenu->isEditable) {
    829829        for (const char** item = editableMenuStrings; *item; ++item)
    830             strings.push_back(WebString::fromUTF8(*item));
     830            strings.append(WebString::fromUTF8(*item));
    831831        WebVector<WebString> suggestions;
    832832        MockSpellCheck::fillSuggestionList(contextMenu->misspelledWord, &suggestions);
    833833        for (size_t i = 0; i < suggestions.size(); ++i)
    834             strings.push_back(suggestions[i]);
     834            strings.append(suggestions[i]);
    835835    } else {
    836836        for (const char** item = nonEditableMenuStrings; *item; ++item)
    837             strings.push_back(WebString::fromUTF8(*item));
     837            strings.append(WebString::fromUTF8(*item));
    838838    }
    839839
     
    860860    webview()->handleInputEvent(event);
    861861
    862 #ifdef WIN32
     862#if OS(WINDOWS)
    863863    initMouseEvent(WebInputEvent::MouseUp, WebMouseEvent::ButtonRight, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
    864864    webview()->handleInputEvent(event);
     
    917917{
    918918    currentDragData.initialize();
    919     vector<string> files = arguments[0].toStringVector();
     919    Vector<string> files = arguments[0].toStringVector();
    920920    WebVector<WebString> absoluteFilenames(files.size());
    921921    for (size_t i = 0; i < files.size(); ++i) {
     
    956956    }
    957957    touchPoint.id = lowestId;
    958     touchPoints.push_back(touchPoint);
     958    touchPoints.append(touchPoint);
    959959}
    960960
     
    970970
    971971    const unsigned index = arguments[0].toInt32();
    972     WEBKIT_ASSERT(index < touchPoints.size());
     972    ASSERT(index < touchPoints.size());
    973973
    974974    WebTouchPoint* touchPoint = &touchPoints[index];
     
    10021002
    10031003    const unsigned index = arguments[0].toInt32();
    1004     WEBKIT_ASSERT(index < touchPoints.size());
     1004    ASSERT(index < touchPoints.size());
    10051005
    10061006    WebPoint position(arguments[1].toInt32(), arguments[2].toInt32());
     
    10161016
    10171017    const unsigned index = arguments[0].toInt32();
    1018     WEBKIT_ASSERT(index < touchPoints.size());
     1018    ASSERT(index < touchPoints.size());
    10191019
    10201020    WebTouchPoint* touchPoint = &touchPoints[index];
     
    10241024void EventSender::sendCurrentTouchEvent(const WebInputEvent::Type type)
    10251025{
    1026     WEBKIT_ASSERT(static_cast<unsigned>(WebTouchEvent::touchesLengthCap) > touchPoints.size());
     1026    ASSERT(static_cast<unsigned>(WebTouchEvent::touchesLengthCap) > touchPoints.size());
    10271027    webview()->layout();
    10281028
     
    10391039        WebTouchPoint* touchPoint = &touchPoints[i];
    10401040        if (touchPoint->state == WebTouchPoint::StateReleased) {
    1041             touchPoints.erase(touchPoints.begin() + i);
     1041            touchPoints.remove(i);
    10421042            --i;
    10431043        } else
     
    12661266        break;
    12671267    default:
    1268         WEBKIT_ASSERT_NOT_REACHED();
     1268        ASSERT_NOT_REACHED();
    12691269    }
    12701270
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp

    r142090 r142109  
    3232#include "KeyCodeMapping.h"
    3333
     34#include <wtf/UnusedParam.h>
     35
    3436namespace WebTestRunner {
    3537
    3638int NativeKeyCodeForWindowsKeyCode(int keysym)
    3739{
    38 #if defined(__linux__) && USE(GTK)
     40#if OS(LINUX) && USE(GTK)
    3941    // See /usr/share/X11/xkb/keycodes/*
    4042    static const int asciiToKeyCode[] = {
     
    239241    }
    240242#else
    241     return keysym - keysym;
     243    UNUSED_PARAM(keysym);
     244    return 0;
    242245#endif
    243246}
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp

    r142090 r142109  
    3232#include "MockGrammarCheck.h"
    3333
    34 #include "Platform/chromium/public/WebCString.h"
    3534#include "Platform/chromium/public/WebString.h"
    36 #include "TestCommon.h"
    3735#include "WebTextCheckingResult.h"
    38 #include <algorithm>
     36
     37#include <wtf/ASCIICType.h>
     38#include <wtf/Assertions.h>
     39#include <wtf/text/WTFString.h>
    3940
    4041using namespace WebKit;
    41 using namespace std;
    4242
    43 namespace WebTestRunner {
    44 
    45 bool MockGrammarCheck::checkGrammarOfString(const WebString& text, vector<WebTextCheckingResult>* results)
     43bool MockGrammarCheck::checkGrammarOfString(const WebString& text, Vector<WebTextCheckingResult>* results)
    4644{
    47     WEBKIT_ASSERT(results);
    48     string16 stringText = text;
    49     if (find_if(stringText.begin(), stringText.end(), isASCIIAlpha) == stringText.end())
     45    ASSERT(results);
     46    WTF::String stringText(text.data(), text.length());
     47    if (stringText.find(isASCIIAlpha) == static_cast<size_t>(-1))
    5048        return true;
    5149
     
    7270    for (size_t i = 0; i < ARRAYSIZE_UNSAFE(grammarErrors); ++i) {
    7371        int offset = 0;
    74         string16 error(grammarErrors[i].text, grammarErrors[i].text + strlen(grammarErrors[i].text));
    75         while ((offset = stringText.find(error, offset)) != string16::npos) {
    76             results->push_back(WebTextCheckingResult(WebTextCheckingTypeGrammar, offset + grammarErrors[i].location, grammarErrors[i].length));
     72        while ((offset = stringText.find(grammarErrors[i].text, offset)) != -1) {
     73            results->append(WebTextCheckingResult(WebTextCheckingTypeGrammar, offset + grammarErrors[i].location, grammarErrors[i].length));
    7774            offset += grammarErrors[i].length;
    7875        }
     
    8077    return false;
    8178}
    82 
    83 }
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h

    r142090 r142109  
    3232#define MockGrammarCheck_h
    3333
    34 #include <vector>
     34#include <wtf/Vector.h>
     35#include <wtf/text/WTFString.h>
    3536
    3637namespace WebKit {
     
    4142}
    4243
    43 namespace WebTestRunner {
    44 
    4544// A mock implementation of a grammar-checker used for WebKit tests. This class
    4645// only implements the minimal functionarities required by WebKit tests, i.e.
     
    5049class MockGrammarCheck {
    5150public:
    52     static bool checkGrammarOfString(const WebKit::WebString&, std::vector<WebKit::WebTextCheckingResult>*);
     51    static bool checkGrammarOfString(const WebKit::WebString&, Vector<WebKit::WebTextCheckingResult>*);
    5352};
    5453
    55 }
    56 
    5754#endif // MockSpellCheck_h
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp

    r142090 r142109  
    3232#include "MockSpellCheck.h"
    3333
    34 #include "TestCommon.h"
    35 #include <public/WebCString.h>
     34#include <wtf/ASCIICType.h>
     35#include <wtf/Assertions.h>
     36#include <wtf/text/WTFString.h>
    3637
    3738using namespace WebKit;
    38 using namespace std;
    3939
    40 namespace WebTestRunner {
    41 
    42 namespace {
    43 
    44 void append(WebVector<WebString>* data, const WebString& item)
     40static void append(WebVector<WebString>* data, const WebString& item)
    4541{
    4642    WebVector<WebString> result(data->size() + 1);
     
    5147}
    5248
    53 }
    54 
    5549MockSpellCheck::MockSpellCheck()
    5650    : m_initialized(false) { }
     
    5852MockSpellCheck::~MockSpellCheck() { }
    5953
     54static bool isNotASCIIAlpha(UChar ch) { return !isASCIIAlpha(ch); }
     55
    6056bool MockSpellCheck::spellCheckWord(const WebString& text, int* misspelledOffset, int* misspelledLength)
    6157{
    62     WEBKIT_ASSERT(misspelledOffset);
    63     WEBKIT_ASSERT(misspelledLength);
     58    ASSERT(misspelledOffset);
     59    ASSERT(misspelledLength);
    6460
    6561    // Initialize this spellchecker.
     
    7066    *misspelledLength = 0;
    7167
    72     // Convert to a string16 because we store string16 instances in
     68    // Convert to a String because we store String instances in
    7369    // m_misspelledWords and WebString has no find().
    74     string16 stringText = text;
     70    String stringText(text.data(), text.length());
    7571    int skippedLength = 0;
    7672
    77     while (!stringText.empty()) {
     73    while (!stringText.isEmpty()) {
    7874        // Extract the first possible English word from the given string.
    7975        // The given string may include non-ASCII characters or numbers. So, we
     
    8379        // If the given string doesn't include any ASCII characters, we can treat the
    8480        // string as valid one.
    85         string16::iterator firstChar = find_if(stringText.begin(), stringText.end(), isASCIIAlpha);
    86         if (firstChar == stringText.end())
     81        int wordOffset = stringText.find(isASCIIAlpha);
     82        if (wordOffset == -1)
    8783            return true;
    88         int wordOffset = distance(stringText.begin(), firstChar);
    8984        int maxWordLength = static_cast<int>(stringText.length()) - wordOffset;
    9085        int wordLength;
    91         string16 word;
     86        String word;
    9287
    9388        // Look up our misspelled-word table to check if the extracted word is a
     
    9893        for (size_t i = 0; i < m_misspelledWords.size(); ++i) {
    9994            wordLength = static_cast<int>(m_misspelledWords.at(i).length()) > maxWordLength ? maxWordLength : static_cast<int>(m_misspelledWords.at(i).length());
    100             word = stringText.substr(wordOffset, wordLength);
     95            word = stringText.substring(wordOffset, wordLength);
    10196            if (word == m_misspelledWords.at(i) && (static_cast<int>(stringText.length()) == wordOffset + wordLength || isNotASCIIAlpha(stringText[wordOffset + wordLength]))) {
    10297                *misspelledOffset = wordOffset + skippedLength;
     
    109104            break;
    110105
    111         string16::iterator lastChar = find_if(stringText.begin() + wordOffset, stringText.end(), isNotASCIIAlpha);
    112         if (lastChar == stringText.end())
    113             wordLength = static_cast<int>(stringText.length()) - wordOffset;
    114         else
    115             wordLength = distance(firstChar, lastChar);
     106        int wordEnd = stringText.find(isNotASCIIAlpha, wordOffset);
     107        wordLength = wordEnd == -1 ? static_cast<int>(stringText.length()) - wordOffset : wordEnd - wordOffset;
    116108
    117         WEBKIT_ASSERT(0 < wordOffset + wordLength);
    118         stringText = stringText.substr(wordOffset + wordLength);
     109        ASSERT(0 < wordOffset + wordLength);
     110        stringText = stringText.substring(wordOffset + wordLength);
    119111        skippedLength += wordOffset + wordLength;
    120112    }
     
    179171    m_misspelledWords.clear();
    180172    for (size_t i = 0; i < arraysize(misspelledWords); ++i)
    181         m_misspelledWords.push_back(string16(misspelledWords[i], misspelledWords[i] + strlen(misspelledWords[i])));
     173        m_misspelledWords.append(String::fromUTF8(misspelledWords[i]));
    182174
    183175    // Mark as initialized to prevent this object from being initialized twice
     
    189181    return false;
    190182}
    191 
    192 }
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h

    r142090 r142109  
    3434#include "Platform/chromium/public/WebString.h"
    3535#include "Platform/chromium/public/WebVector.h"
    36 #include <vector>
    37 
    38 namespace WebTestRunner {
     36#include <wtf/Vector.h>
     37#include <wtf/text/WTFString.h>
    3938
    4039// A mock implementation of a spell-checker used for WebKit tests.
     
    7271
    7372    // A table that consists of misspelled words.
    74     std::vector<string16> m_misspelledWords;
     73    Vector<String> m_misspelledWords;
    7574
    7675    // A flag representing whether or not this object is initialized.
     
    7877};
    7978
    80 }
    81 
    8279#endif // MockSpellCheck_h
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp

    r142090 r142109  
    3838
    3939using namespace WebKit;
    40 using namespace std;
    4140
    4241namespace WebTestRunner {
     
    8382void SpellCheckClient::checkTextOfParagraph(const WebString& text, WebTextCheckingTypeMask mask, WebVector<WebTextCheckingResult>* webResults)
    8483{
    85     vector<WebTextCheckingResult> results;
     84    Vector<WebTextCheckingResult> results;
    8685    if (mask & WebTextCheckingTypeSpelling) {
    8786        size_t offset = 0;
     
    9897            result.location = offset + misspelledPosition;
    9998            result.length = misspelledLength;
    100             results.push_back(result);
     99            results.append(result);
    101100            offset += misspelledPosition + misspelledLength;
    102101        }
     
    122121void SpellCheckClient::finishLastTextCheck()
    123122{
    124     vector<WebTextCheckingResult> results;
     123    Vector<WebTextCheckingResult> results;
    125124    int offset = 0;
    126     string16 text = m_lastRequestedTextCheckString;
     125    String text(m_lastRequestedTextCheckString.data(), m_lastRequestedTextCheckString.length());
    127126    while (text.length()) {
    128127        int misspelledPosition = 0;
    129128        int misspelledLength = 0;
    130         m_spellcheck.spellCheckWord(WebString(text), &misspelledPosition, &misspelledLength);
     129        m_spellcheck.spellCheckWord(WebString(text.characters(), text.length()), &misspelledPosition, &misspelledLength);
    131130        if (!misspelledLength)
    132131            break;
    133132        WebVector<WebString> suggestions;
    134         m_spellcheck.fillSuggestionList(WebString(text.substr(misspelledPosition, misspelledLength)), &suggestions);
    135         results.push_back(WebTextCheckingResult(WebTextCheckingTypeSpelling, offset + misspelledPosition, misspelledLength, suggestions.isEmpty() ? WebString() : suggestions[0]));
    136         text = text.substr(misspelledPosition + misspelledLength);
     133        m_spellcheck.fillSuggestionList(WebString(text.characters() + misspelledPosition, misspelledLength), &suggestions);
     134        results.append(WebTextCheckingResult(WebTextCheckingTypeSpelling, offset + misspelledPosition, misspelledLength, suggestions.isEmpty() ? WebString() : suggestions[0]));
     135        text = text.substring(misspelledPosition + misspelledLength);
    137136        offset += misspelledPosition + misspelledLength;
    138137    }
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp

    r142090 r142109  
    4646
    4747TestInterfaces::TestInterfaces()
    48     : m_accessibilityController(new AccessibilityController())
    49     , m_eventSender(new EventSender())
    50     , m_gamepadController(new GamepadController())
    51     , m_textInputController(new TextInputController())
    52     , m_testRunner(new TestRunner())
    53     , m_webView(0)
     48    : m_webView(0)
    5449{
     50    m_accessibilityController = adoptPtr(new AccessibilityController());
     51    m_eventSender = adoptPtr(new EventSender());
     52    m_gamepadController = adoptPtr(new GamepadController());
     53    m_textInputController = adoptPtr(new TextInputController());
     54    m_testRunner = adoptPtr(new TestRunner());
    5555}
    5656
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h

    r142090 r142109  
    3232#define TestInterfaces_h
    3333
    34 #include <memory>
     34#include <wtf/OwnPtr.h>
    3535
    3636namespace WebKit {
     
    6666
    6767private:
    68     std::auto_ptr<AccessibilityController> m_accessibilityController;
    69     std::auto_ptr<EventSender> m_eventSender;
    70     std::auto_ptr<GamepadController> m_gamepadController;
    71     std::auto_ptr<TextInputController> m_textInputController;
    72     std::auto_ptr<TestRunner> m_testRunner;
     68    OwnPtr<AccessibilityController> m_accessibilityController;
     69    OwnPtr<EventSender> m_eventSender;
     70    OwnPtr<GamepadController> m_gamepadController;
     71    OwnPtr<TextInputController> m_textInputController;
     72    OwnPtr<TestRunner> m_testRunner;
    7373    WebKit::WebView* m_webView;
    7474};
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp

    r142090 r142109  
    2727#include "TestPlugin.h"
    2828
    29 #include "TestCommon.h"
    3029#include "WebFrame.h"
    3130#include "WebInputEvent.h"
     
    3736#include <public/WebCompositorSupport.h>
    3837#include <public/WebGraphicsContext3D.h>
     38#include <wtf/Assertions.h>
     39#include <wtf/PassOwnPtr.h>
     40#include <wtf/StringExtras.h>
     41#include <wtf/text/CString.h>
    3942
    4043using namespace WebKit;
    41 using namespace std;
    4244
    4345namespace WebTestRunner {
     
    98100    }
    99101
    100     WEBKIT_ASSERT_NOT_REACHED();
     102    ASSERT_NOT_REACHED();
    101103    return 0;
    102104}
     
    133135WebPluginContainer::TouchEventRequestType parseTouchEventRequestType(const WebString& string)
    134136{
    135     if (string == WebString::fromUTF8("raw"))
     137    DEFINE_STATIC_LOCAL(const WebString, kPrimitiveRaw, (WebString::fromUTF8("raw")));
     138    DEFINE_STATIC_LOCAL(const WebString, kPrimitiveSynthetic, (WebString::fromUTF8("synthetic")));
     139
     140    if (string == kPrimitiveRaw)
    136141        return WebPluginContainer::TouchEventRequestTypeRaw;
    137     if (string == WebString::fromUTF8("synthetic"))
     142    if (string == kPrimitiveSynthetic)
    138143        return WebPluginContainer::TouchEventRequestTypeSynthesizedMouse;
    139144    return WebPluginContainer::TouchEventRequestTypeNone;
     
    164169    static const WebString kAttributePrintUserGestureStatus = WebString::fromUTF8("print-user-gesture-status");
    165170
    166     WEBKIT_ASSERT(params.attributeNames.size() == params.attributeValues.size());
     171    ASSERT(params.attributeNames.size() == params.attributeValues.size());
    167172    size_t size = params.attributeNames.size();
    168173    for (size_t i = 0; i < size; ++i) {
     
    208213        return false;
    209214
    210     m_layer = auto_ptr<WebExternalTextureLayer>(Platform::current()->compositorSupport()->createExternalTextureLayer(this));
     215    m_layer = adoptPtr(Platform::current()->compositorSupport()->createExternalTextureLayer(this));
    211216    m_container = container;
    212217    m_container->setWebLayer(m_layer->layer());
     
    224229    if (m_container)
    225230        m_container->setWebLayer(0);
    226     m_layer.reset();
     231    m_layer.clear();
    227232    destroyScene();
    228233
     
    271276        primitive = PrimitiveTriangle;
    272277    else
    273         WEBKIT_ASSERT_NOT_REACHED();
     278        ASSERT_NOT_REACHED();
    274279    return primitive;
    275280}
     
    290295        color[2] = 255;
    291296    else
    292         WEBKIT_ASSERT_NOT_REACHED();
     297        ASSERT_NOT_REACHED();
    293298}
    294299
     
    357362bool TestPlugin::initProgram()
    358363{
    359     const string vertexSource(
     364    const CString vertexSource(
    360365        "attribute vec4 position;  \n"
    361366        "void main() {             \n"
     
    364369    );
    365370
    366     const string fragmentSource(
     371    const CString fragmentSource(
    367372        "precision mediump float; \n"
    368373        "uniform vec4 color;      \n"
     
    383388bool TestPlugin::initPrimitive()
    384389{
    385     WEBKIT_ASSERT(m_scene.primitive == PrimitiveTriangle);
     390    ASSERT(m_scene.primitive == PrimitiveTriangle);
    386391
    387392    m_scene.vbo = m_context->createBuffer();
     
    401406void TestPlugin::drawPrimitive()
    402407{
    403     WEBKIT_ASSERT(m_scene.primitive == PrimitiveTriangle);
    404     WEBKIT_ASSERT(m_scene.vbo);
    405     WEBKIT_ASSERT(m_scene.program);
     408    ASSERT(m_scene.primitive == PrimitiveTriangle);
     409    ASSERT(m_scene.vbo);
     410    ASSERT(m_scene.program);
    406411
    407412    m_context->useProgram(m_scene.program);
     
    419424}
    420425
    421 unsigned TestPlugin::loadShader(unsigned type, const string& source)
     426unsigned TestPlugin::loadShader(unsigned type, const CString& source)
    422427{
    423428    unsigned shader = m_context->createShader(type);
     
    436441}
    437442
    438 unsigned TestPlugin::loadProgram(const string& vertexSource, const string& fragmentSource)
     443unsigned TestPlugin::loadProgram(const CString& vertexSource, const CString& fragmentSource)
    439444{
    440445    unsigned vertexShader = loadShader(GL_VERTEX_SHADER, vertexSource);
     
    529534        break;
    530535    case WebDragStatusUnknown:
    531         WEBKIT_ASSERT_NOT_REACHED();
     536        ASSERT_NOT_REACHED();
    532537    }
    533538    m_delegate->printMessage(std::string("Plugin received event: ") + dragStatusName + "\n");
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestPlugin.h

    r142090 r142109  
    2929#include "WebPlugin.h"
    3030#include "WebPluginContainer.h"
    31 #include <memory>
    3231#include <public/WebExternalTextureLayer.h>
    3332#include <public/WebExternalTextureLayerClient.h>
    34 #include <string>
     33#include <wtf/OwnPtr.h>
    3534
    3635namespace WebTestRunner {
     
    126125    bool initPrimitive();
    127126    void drawPrimitive();
    128     unsigned loadShader(unsigned type, const std::string& source);
    129     unsigned loadProgram(const std::string& vertexSource, const std::string& fragmentSource);
     127    unsigned loadShader(unsigned type, const WTF::CString& source);
     128    unsigned loadProgram(const WTF::CString& vertexSource, const WTF::CString& fragmentSource);
    130129
    131130    WebKit::WebFrame* m_frame;
     
    138137    unsigned m_framebuffer;
    139138    Scene m_scene;
    140     std::auto_ptr<WebKit::WebExternalTextureLayer> m_layer;
     139    OwnPtr<WebKit::WebExternalTextureLayer> m_layer;
    141140
    142141    WebKit::WebPluginContainer::TouchEventRequestType m_touchEventRequest;
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp

    r142090 r142109  
    5656#include "WebWorkerInfo.h"
    5757#include "v8/include/v8.h"
    58 #include <limits>
    59 #include <memory>
    6058#include <public/WebData.h>
    6159#include <public/WebPoint.h>
    62 
    63 #if defined(__linux__) || defined(ANDROID)
     60#include <wtf/OwnArrayPtr.h>
     61#include <wtf/text/WTFString.h>
     62
     63#if OS(LINUX) || OS(ANDROID)
    6464#include "linux/WebFontRendering.h"
    6565#endif
     
    8484class InvokeCallbackTask : public WebMethodTask<TestRunner> {
    8585public:
    86     InvokeCallbackTask(TestRunner* object, auto_ptr<CppVariant> callbackArguments)
     86    InvokeCallbackTask(TestRunner* object, PassOwnArrayPtr<CppVariant> callbackArguments, uint32_t numberOfArguments)
    8787        : WebMethodTask<TestRunner>(object)
    8888        , m_callbackArguments(callbackArguments)
     89        , m_numberOfArguments(numberOfArguments)
    8990    {
    9091    }
     
    9394    {
    9495        CppVariant invokeResult;
    95         m_callbackArguments->invokeDefault(m_callbackArguments.get(), 1, invokeResult);
     96        m_callbackArguments[0].invokeDefault(m_callbackArguments.get(), m_numberOfArguments, invokeResult);
    9697    }
    9798
    9899private:
    99     auto_ptr<CppVariant> m_callbackArguments;
     100    OwnArrayPtr<CppVariant> m_callbackArguments;
     101    uint32_t m_numberOfArguments;
    100102};
    101103
     
    112114        return;
    113115
    114     if (!m_queue.empty()) {
     116    if (!m_queue.isEmpty()) {
    115117        // We delay processing queued work to avoid recursion problems.
    116118        m_controller->m_delegate->postTask(new WorkQueueTask(this));
     
    122124{
    123125    // Quit doing work once a load is in progress.
    124     while (!m_queue.empty()) {
    125         bool startedLoad = m_queue.front()->run(m_controller->m_delegate, m_controller->m_webView);
    126         delete m_queue.front();
    127         m_queue.pop_front();
     126    while (!m_queue.isEmpty()) {
     127        bool startedLoad = m_queue.first()->run(m_controller->m_delegate, m_controller->m_webView);
     128        delete m_queue.takeFirst();
    128129        if (startedLoad)
    129130            return;
     
    137138{
    138139    m_frozen = false;
    139     while (!m_queue.empty()) {
    140         delete m_queue.front();
    141         m_queue.pop_front();
    142     }
     140    while (!m_queue.isEmpty())
     141        delete m_queue.takeFirst();
    143142}
    144143
     
    149148        return;
    150149    }
    151     m_queue.push_back(work);
     150    m_queue.append(work);
    152151}
    153152
     
    158157    , m_delegate(0)
    159158    , m_webView(0)
    160     , m_intentClient(new EmptyWebDeliveredIntentClient)
    161     , m_webPermissions(new WebPermissions)
     159    , m_intentClient(adoptPtr(new EmptyWebDeliveredIntentClient))
     160    , m_webPermissions(adoptPtr(new WebPermissions))
    162161{
    163162    // Initialize the map that associates methods of this class with the names
     
    217216    bindMethod("setSelectTrailingWhitespaceEnabled", &TestRunner::setSelectTrailingWhitespaceEnabled);
    218217    bindMethod("setMockDeviceOrientation", &TestRunner::setMockDeviceOrientation);
     218#if ENABLE(POINTER_LOCK)
    219219    bindMethod("didAcquirePointerLock", &TestRunner::didAcquirePointerLock);
    220220    bindMethod("didLosePointerLock", &TestRunner::didLosePointerLock);
     
    222222    bindMethod("setPointerLockWillRespondAsynchronously", &TestRunner::setPointerLockWillRespondAsynchronously);
    223223    bindMethod("setPointerLockWillFailSynchronously", &TestRunner::setPointerLockWillFailSynchronously);
     224#endif
    224225
    225226    // The following modify WebPreferences.
     
    273274    bindMethod("setWillSendRequestReturnsNullOnRedirect", &TestRunner::setWillSendRequestReturnsNullOnRedirect);
    274275
     276#if ENABLE(WEB_INTENTS)
    275277    // The following methods interact with the WebTestProxy.
    276 #if ENABLE_WEB_INTENTS
    277278    bindMethod("sendWebIntentResponse", &TestRunner::sendWebIntentResponse);
    278279    bindMethod("deliverWebIntent", &TestRunner::deliverWebIntent);
     
    294295    bindMethod("setMockGeolocationPositionUnavailableError", &TestRunner::setMockGeolocationPositionUnavailableError);
    295296    bindMethod("setMockGeolocationPosition", &TestRunner::setMockGeolocationPosition);
     297#if ENABLE(NOTIFICATIONS)
    296298    bindMethod("grantWebNotificationPermission", &TestRunner::grantWebNotificationPermission);
    297299    bindMethod("simulateLegacyWebNotificationClick", &TestRunner::simulateLegacyWebNotificationClick);
     300#endif
     301#if ENABLE(INPUT_SPEECH)
    298302    bindMethod("addMockSpeechInputResult", &TestRunner::addMockSpeechInputResult);
    299303    bindMethod("setMockSpeechInputDumpRect", &TestRunner::setMockSpeechInputDumpRect);
     304#endif
     305#if ENABLE(SCRIPTED_SPEECH)
    300306    bindMethod("addMockSpeechRecognitionResult", &TestRunner::addMockSpeechRecognitionResult);
    301307    bindMethod("setMockSpeechRecognitionError", &TestRunner::setMockSpeechRecognitionError);
    302308    bindMethod("wasMockSpeechRecognitionAborted", &TestRunner::wasMockSpeechRecognitionAborted);
     309#endif
    303310    bindMethod("display", &TestRunner::display);
    304311    bindMethod("displayInvalidatedRegion", &TestRunner::displayInvalidatedRegion);
     
    315322    // The following are stubs.
    316323    bindMethod("dumpDatabaseCallbacks", &TestRunner::notImplemented);
     324#if ENABLE(NOTIFICATIONS)
    317325    bindMethod("denyWebNotificationPermission", &TestRunner::notImplemented);
    318326    bindMethod("removeAllWebNotificationPermissions", &TestRunner::notImplemented);
    319327    bindMethod("simulateWebNotificationClick", &TestRunner::notImplemented);
     328#endif
    320329    bindMethod("setIconDatabaseEnabled", &TestRunner::notImplemented);
    321330    bindMethod("setScrollbarPolicy", &TestRunner::notImplemented);
     
    358367        m_webView->setZoomLevel(false, 0);
    359368        m_webView->setTabKeyCyclesThroughElements(true);
    360 #if !defined(__APPLE__) && !defined(WIN32) // Actually, TOOLKIT_GTK
     369#if !OS(DARWIN) && !OS(WINDOWS) // Actually, TOOLKIT_GTK
    361370        // (Constants copied because we can't depend on the header that defined
    362371        // them from this file.)
     
    373382
    374383    WebSecurityPolicy::resetOriginAccessWhitelists();
    375 #if defined(__linux__) || defined(ANDROID)
     384#if OS(LINUX) || OS(ANDROID)
    376385    WebFontRendering::setSubpixelPositioning(false);
    377386#endif
     
    412421    m_willSendRequestShouldReturnNull = false;
    413422    m_smartInsertDeleteEnabled = true;
    414 #ifdef WIN32
     423#if OS(WINDOWS)
    415424    m_selectTrailingWhitespaceEnabled = true;
    416425#else
     
    628637void TestRunner::policyDelegateDone()
    629638{
    630     WEBKIT_ASSERT(m_waitUntilDone);
     639    ASSERT(m_waitUntilDone);
    631640    m_delegate->testFinished();
    632641    m_waitUntilDone = false;
     
    13231332    bool wrapAround = false;
    13241333    if (arguments.size() >= 2) {
    1325         vector<string> optionsArray = arguments[1].toStringVector();
     1334        Vector<std::string> optionsArray = arguments[1].toStringVector();
    13261335        findOptions.matchCase = true;
    13271336
     
    14031412void TestRunner::setTextSubpixelPositioning(const CppArgumentList& arguments, CppVariant* result)
    14041413{
    1405 #if defined(__linux__) || defined(ANDROID)
     1414#if OS(LINUX) || OS(ANDROID)
    14061415    // Since FontConfig doesn't provide a variable to control subpixel positioning, we'll fall back
    14071416    // to setting it globally for all fonts.
     
    16721681        prefs->shouldRespectImageOrientation = cppVariantToBool(value);
    16731682    else if (key == "WebKitWebAudioEnabled")
    1674         WEBKIT_ASSERT(cppVariantToBool(value));
     1683        ASSERT(cppVariantToBool(value));
    16751684    else {
    16761685        string message("Invalid name for preference: ");
     
    17171726}
    17181727
    1719 #if ENABLE_WEB_INTENTS
     1728#if ENABLE(WEB_INTENTS)
    17201729void TestRunner::sendWebIntentResponse(const CppArgumentList& arguments, CppVariant* result)
    17211730{
     
    18251834    m_delegate->setDeviceScaleFactor(value);
    18261835
    1827     auto_ptr<CppVariant> callbackArguments(new CppVariant());
    1828     callbackArguments->set(arguments[1]);
    1829     result->setNull();
    1830     m_delegate->postTask(new InvokeCallbackTask(this, callbackArguments));
     1836    OwnArrayPtr<CppVariant> callbackArguments = adoptArrayPtr(new CppVariant[1]);
     1837    callbackArguments[0].set(arguments[1]);
     1838    result->setNull();
     1839    m_delegate->postTask(new InvokeCallbackTask(this, callbackArguments.release(), 1));
    18311840}
    18321841
     
    18691878}
    18701879
     1880#if ENABLE(NOTIFICATIONS)
    18711881void TestRunner::grantWebNotificationPermission(const CppArgumentList& arguments, CppVariant* result)
    18721882{
     
    18871897    result->set(m_delegate->simulateLegacyWebNotificationClick(arguments[0].toString()));
    18881898}
    1889 
     1899#endif
     1900
     1901#if ENABLE(INPUT_SPEECH)
    18901902void TestRunner::addMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
    18911903{
     
    19051917    m_delegate->setMockSpeechInputDumpRect(arguments[0].toBoolean());
    19061918}
    1907 
     1919#endif
     1920
     1921#if ENABLE(SCRIPTED_SPEECH)
    19081922void TestRunner::addMockSpeechRecognitionResult(const CppArgumentList& arguments, CppVariant* result)
    19091923{
     
    19281942    result->set(m_delegate->wasMockSpeechRecognitionAborted());
    19291943}
     1944#endif
    19301945
    19311946void TestRunner::display(const CppArgumentList& arguments, CppVariant* result)
     
    21072122}
    21082123
     2124#if ENABLE(POINTER_LOCK)
    21092125void TestRunner::didAcquirePointerLock(const CppArgumentList&, CppVariant* result)
    21102126{
     
    21362152    result->setNull();
    21372153}
    2138 
    2139 }
     2154#endif
     2155
     2156}
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h

    r142090 r142109  
    3535
    3636#include "CppBoundClass.h"
    37 #include "TestCommon.h"
    3837#include "WebArrayBufferView.h"
    3938#include "WebDeliveredIntentClient.h"
     
    4140#include "WebTestRunner.h"
    4241#include "WebTextDirection.h"
    43 #include <deque>
    44 #include <memory>
    4542#include <public/WebURL.h>
    4643#include <set>
    4744#include <string>
     45#include <wtf/Deque.h>
    4846
    4947namespace WebKit {
     
    144142
    145143        void setFrozen(bool frozen) { m_frozen = frozen; }
    146         bool isEmpty() { return m_queue.empty(); }
     144        bool isEmpty() { return m_queue.isEmpty(); }
    147145        WebTaskList* taskList() { return &m_taskList; }
    148146
     
    156154
    157155        WebTaskList m_taskList;
    158         std::deque<WorkItem*> m_queue;
     156        Deque<WorkItem*> m_queue;
    159157        bool m_frozen;
    160158        TestRunner* m_controller;
     
    278276    void setMockDeviceOrientation(const CppArgumentList&, CppVariant*);
    279277
     278#if ENABLE(POINTER_LOCK)
    280279    void didAcquirePointerLock(const CppArgumentList&, CppVariant*);
    281280    void didNotAcquirePointerLock(const CppArgumentList&, CppVariant*);
     
    283282    void setPointerLockWillFailSynchronously(const CppArgumentList&, CppVariant*);
    284283    void setPointerLockWillRespondAsynchronously(const CppArgumentList&, CppVariant*);
     284#endif
    285285
    286286    ///////////////////////////////////////////////////////////////////////////
     
    421421    // Methods interacting with the WebTestProxy
    422422
    423 #if ENABLE_WEB_INTENTS
     423#if ENABLE(WEB_INTENTS)
    424424    // Expects one string argument for sending successful result, zero
    425425    // arguments for sending a failure result.
     
    469469    void setMockGeolocationPositionUnavailableError(const CppArgumentList&, CppVariant*);
    470470
     471#if ENABLE(NOTIFICATIONS)
    471472    // Grants permission for desktop notifications to an origin
    472473    void grantWebNotificationPermission(const CppArgumentList&, CppVariant*);
    473474    // Simulates a click on a desktop notification.
    474475    void simulateLegacyWebNotificationClick(const CppArgumentList&, CppVariant*);
     476#endif
    475477
    476478    // Speech input related functions.
     479#if ENABLE(INPUT_SPEECH)
    477480    void addMockSpeechInputResult(const CppArgumentList&, CppVariant*);
    478481    void setMockSpeechInputDumpRect(const CppArgumentList&, CppVariant*);
     482#endif
     483#if ENABLE(SCRIPTED_SPEECH)
    479484    void addMockSpeechRecognitionResult(const CppArgumentList&, CppVariant*);
    480485    void setMockSpeechRecognitionError(const CppArgumentList&, CppVariant*);
    481486    void wasMockSpeechRecognitionAborted(const CppArgumentList&, CppVariant*);
     487#endif
    482488
    483489    void display(const CppArgumentList&, CppVariant*);
     
    677683
    678684    // Mock object for testing delivering web intents.
    679     std::auto_ptr<WebKit::WebDeliveredIntentClient> m_intentClient;
     685    OwnPtr<WebKit::WebDeliveredIntentClient> m_intentClient;
    680686
    681687    // WebPermissionClient mock object.
    682     std::auto_ptr<WebPermissions> m_webPermissions;
     688    OwnPtr<WebPermissions> m_webPermissions;
    683689};
    684690
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp

    r142090 r142109  
    3232#include "TextInputController.h"
    3333
    34 #include "TestCommon.h"
    3534#include "WebBindings.h"
    3635#include "WebCompositionUnderline.h"
     
    4241#include <public/WebVector.h>
    4342#include <string>
     43#include <wtf/StringExtras.h>
    4444
    4545using namespace WebKit;
    46 using namespace std;
    4746
    4847namespace WebTestRunner {
     
    148147
    149148    WebRange range = mainFrame->markedRange();
    150     vector<int> intArray(2);
     149    Vector<int> intArray(2);
    151150    intArray[0] = range.startOffset();
    152151    intArray[1] = range.endOffset();
     
    163162
    164163    WebRange range = mainFrame->selectionRange();
    165     vector<int> intArray(2);
     164    Vector<int> intArray(2);
    166165    intArray[0] = range.startOffset();
    167166    intArray[1] = range.endOffset();
     
    184183        return;
    185184
    186     vector<int> intArray(4);
     185    Vector<int> intArray(4);
    187186    intArray[0] = rect.x;
    188187    intArray[1] = rect.y;
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp

    r142090 r142109  
    4141void WebPreferences::reset()
    4242{
    43 #ifdef __APPLE__
     43#if OS(MAC_OS_X)
    4444    cursiveFontFamily = WebString::fromUTF8("Apple Chancery");
    4545    fantasyFontFamily = WebString::fromUTF8("Papyrus");
     
    107107    allowUniversalAccessFromFileURLs = true;
    108108
    109 #ifdef __APPLE__
     109#if OS(DARWIN)
    110110    editingBehavior = WebSettings::EditingBehaviorMac;
    111111#else
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTask.cpp

    r142090 r142109  
    3333
    3434#include "WebKit.h"
    35 #include <algorithm>
    36 
    37 using namespace std;
     35#include <wtf/Vector.h>
    3836
    3937namespace WebTestRunner {
     
    5149}
    5250
     51class WebTaskList::Private : public Vector<WebTask*> {
     52};
     53
    5354WebTaskList::WebTaskList()
     55    : m_private(new Private)
    5456{
    5557}
     
    5860{
    5961    revokeAll();
     62    delete m_private;
    6063}
    6164
    6265void WebTaskList::registerTask(WebTask* task)
    6366{
    64     m_tasks.push_back(task);
     67    m_private->append(task);
    6568}
    6669
    6770void WebTaskList::unregisterTask(WebTask* task)
    6871{
    69     vector<WebTask*>::iterator iter = find(m_tasks.begin(), m_tasks.end(), task);
    70     if (iter != m_tasks.end())
    71         m_tasks.erase(iter);
     72    size_t index = m_private->find(task);
     73    if (index != notFound)
     74        m_private->remove(index);
    7275}
    7376
    7477void WebTaskList::revokeAll()
    7578{
    76     while (!m_tasks.empty())
    77         m_tasks[0]->cancel();
     79    while (!m_private->isEmpty())
     80        (*m_private)[0]->cancel();
    7881}
    7982
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp

    r142090 r142109  
    4040
    4141WebTestInterfaces::WebTestInterfaces()
    42     : m_interfaces(new TestInterfaces())
    4342{
     43    m_interfaces = new TestInterfaces;
    4444}
    4545
    4646WebTestInterfaces::~WebTestInterfaces()
    4747{
     48    delete m_interfaces;
    4849}
    4950
     
    8586TestInterfaces* WebTestInterfaces::testInterfaces()
    8687{
    87     return m_interfaces.get();
     88    return m_interfaces;
    8889}
    8990
  • trunk/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp

    r142090 r142109  
    3535#include "EventSender.h"
    3636#include "SpellCheckClient.h"
    37 #include "TestCommon.h"
    3837#include "TestInterfaces.h"
    3938#include "TestPlugin.h"
     
    6059#include <public/WebURLRequest.h>
    6160#include <public/WebURLResponse.h>
     61#include <wtf/StringExtras.h>
    6262
    6363using namespace WebKit;
     
    213213    size_t pos = url.rfind('/');
    214214    if (pos == string::npos) {
    215 #ifdef WIN32
     215#if OS(WINDOWS)
    216216        pos = url.rfind('\\');
    217217        if (pos == string::npos)
     
    268268WebTestProxyBase::~WebTestProxyBase()
    269269{
     270    delete m_spellcheck;
    270271}
    271272
     
    290291WebSpellCheckClient* WebTestProxyBase::spellCheckClient() const
    291292{
    292     return m_spellcheck.get();
     293    return m_spellcheck;
    293294}
    294295
     
    556557void WebTestProxyBase::registerIntentService(WebFrame*, const WebIntentServiceInfo& service)
    557558{
    558 #if ENABLE_WEB_INTENTS
     559#if ENABLE(WEB_INTENTS)
    559560    m_delegate->printMessage(string("Registered Web Intent Service: action=") + service.action().utf8().data() + " type=" + service.type().utf8().data() + " title=" + service.title().utf8().data() + " url=" + service.url().spec().data() + " disposition=" + service.disposition().utf8().data() + "\n");
    560561#endif
     
    563564void WebTestProxyBase::dispatchIntent(WebFrame* source, const WebIntentRequest& request)
    564565{
    565 #if ENABLE_WEB_INTENTS
     566#if ENABLE(WEB_INTENTS)
    566567    m_delegate->printMessage(string("Received Web Intent: action=") + request.intent().action().utf8().data() + " type=" + request.intent().type().utf8().data() + "\n");
    567568    WebMessagePortChannelArray* ports = request.intent().messagePortChannelsRelease();
     
    778779{
    779780    if (m_testInterfaces->testRunner()->shouldDumpResourceLoadCallbacks()) {
    780         WEBKIT_ASSERT(m_resourceIdentifierMap.find(identifier) == m_resourceIdentifierMap.end());
     781        ASSERT(m_resourceIdentifierMap.find(identifier) == m_resourceIdentifierMap.end());
    781782        m_resourceIdentifierMap[identifier] = descriptionSuitableForTestResult(request.url().spec());
    782783    }
Note: See TracChangeset for help on using the changeset viewer.