Bug 107455 - [chromium] move spell checking mocks to TestRunner library
Summary: [chromium] move spell checking mocks to TestRunner library
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: jochen
URL:
Keywords:
Depends on:
Blocks: 91308
  Show dependency treegraph
 
Reported: 2013-01-21 08:11 PST by jochen
Modified: 2013-01-22 01:02 PST (History)
7 users (show)

See Also:


Attachments
Patch (64.57 KB, patch)
2013-01-21 08:12 PST, jochen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.