Bug 107455

Summary: [chromium] move spell checking mocks to TestRunner library
Product: WebKit Reporter: jochen
Component: New BugsAssignee: jochen
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, fishd, jamesr, tkent, tkent+wkapi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 91308    
Attachments:
Description Flags
Patch none

Description jochen 2013-01-21 08:11:20 PST
[chromium] move spell checking mocks to TestRunner library
Comment 1 jochen 2013-01-21 08:12:12 PST
Created attachment 183790 [details]
Patch
Comment 2 WebKit Review Bot 2013-01-21 08:16:11 PST
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Kent Tamura 2013-01-21 22:28:16 PST
Comment on attachment 183790 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=183790&action=review

> Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:57
> -    virtual void fillSpellingSuggestionList(const WebKit::WebString& word, WebKit::WebVector<WebKit::WebString>* suggestions) = 0;
> +    virtual void fillSpellingSuggestionList(const WebKit::WebString&, WebKit::WebVector<WebKit::WebString>*) { }

nit: You don't need to remove the argument names.  "word" "suggestions" have additional information.

> Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:200
> +    , m_spellcheck(new SpellCheckClient)
>  {
>  }
>  
>  WebTestProxyBase::~WebTestProxyBase()
>  {
> +    delete m_spellcheck;

We should avoid manual memory management.  Can you use OwnPtr<>?
Comment 4 jochen 2013-01-21 22:38:35 PST
Won't I get an unused arguments warning when I don't remove the names?

I can't used OwnPtr in a public API header, and I can't use WebPrivatePtr since the TestRunner's implementation doesn't define WEBKIT_IMPLEMENTATION. Therefore, we use raw pointers, see e.g. WebTestInterfaces
Comment 5 Kent Tamura 2013-01-21 22:41:40 PST
Ah, I understand.
Comment 6 WebKit Review Bot 2013-01-22 01:02:07 PST
Comment on attachment 183790 [details]
Patch

Clearing flags on attachment: 183790

Committed r140396: <http://trac.webkit.org/changeset/140396>
Comment 7 WebKit Review Bot 2013-01-22 01:02:12 PST
All reviewed patches have been landed.  Closing bug.