Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: public/testing/WebTestProxy.h

Issue 23440025: TestRunner library classes should be marked as NonCopyable. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « public/testing/WebFrameTestProxy.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef WebTestProxy_h 31 #ifndef WebTestProxy_h
32 #define WebTestProxy_h 32 #define WebTestProxy_h
33 33
34 #include "WebTask.h" 34 #include "WebTask.h"
35 #include "WebTestCommon.h" 35 #include "WebTestCommon.h"
36 #include "public/platform/WebNonCopyable.h"
36 #include "public/platform/WebRect.h" 37 #include "public/platform/WebRect.h"
37 #include "public/platform/WebURLError.h" 38 #include "public/platform/WebURLError.h"
38 #include "public/platform/WebURLRequest.h" 39 #include "public/platform/WebURLRequest.h"
39 #include "public/web/WebAXEnums.h" 40 #include "public/web/WebAXEnums.h"
40 #include "public/web/WebDOMMessageEvent.h" 41 #include "public/web/WebDOMMessageEvent.h"
41 #include "public/web/WebDataSource.h" 42 #include "public/web/WebDataSource.h"
42 #include "public/web/WebDragOperation.h" 43 #include "public/web/WebDragOperation.h"
43 #include "public/web/WebEditingAction.h" 44 #include "public/web/WebEditingAction.h"
44 #include "public/web/WebIconURL.h" 45 #include "public/web/WebIconURL.h"
45 #include "public/web/WebNavigationPolicy.h" 46 #include "public/web/WebNavigationPolicy.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 bool m_logConsoleOutput; 256 bool m_logConsoleOutput;
256 int m_chooserCount; 257 int m_chooserCount;
257 258
258 std::auto_ptr<WebKit::WebGeolocationClientMock> m_geolocationClient; 259 std::auto_ptr<WebKit::WebGeolocationClientMock> m_geolocationClient;
259 std::auto_ptr<WebKit::WebMIDIClientMock> m_midiClient; 260 std::auto_ptr<WebKit::WebMIDIClientMock> m_midiClient;
260 std::auto_ptr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationCli ent; 261 std::auto_ptr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationCli ent;
261 std::auto_ptr<MockWebSpeechRecognizer> m_speechRecognizer; 262 std::auto_ptr<MockWebSpeechRecognizer> m_speechRecognizer;
262 std::auto_ptr<MockWebSpeechInputController> m_speechInputController; 263 std::auto_ptr<MockWebSpeechInputController> m_speechInputController;
263 std::auto_ptr<MockWebValidationMessageClient> m_validationMessageClient; 264 std::auto_ptr<MockWebValidationMessageClient> m_validationMessageClient;
264 265
266 // FIXME:: We want to move away from this pattern and mark classes
267 // as Noncopyable, but this class is marked as WEBTESTRUNNER_EXPORT
268 // while WebNonCopyable is not, so we cannot inherit from WebNonCopyable.
269 // To overcome the problem, for now not inheriting from WebNonCopyable
270 // but plan to fix it when we make the change of making WebNonCopyable
271 // a macro rather than class. We will have a single way to mark all classes
272 // as Noncopyable.
273 // Tracked under: http://code.google.com/p/chromium/issues/detail?id=229178
265 private: 274 private:
266 WebTestProxyBase(WebTestProxyBase&); 275 WebTestProxyBase(WebTestProxyBase&);
267 WebTestProxyBase& operator=(const WebTestProxyBase&); 276 WebTestProxyBase& operator=(const WebTestProxyBase&);
268 }; 277 };
269 278
270 // Use this template to inject methods into your WebViewClient/WebFrameClient 279 // Use this template to inject methods into your WebViewClient/WebFrameClient
271 // implementation required for the running layout tests. 280 // implementation required for the running layout tests.
272 template<class Base, typename T> 281 template<class Base, typename T>
273 class WebTestProxy : public Base, public WebTestProxyBase { 282 class WebTestProxy : public Base, public WebTestProxyBase, public WebKit::WebNon Copyable {
274 public: 283 public:
275 explicit WebTestProxy(T t) 284 explicit WebTestProxy(T t)
276 : Base(t) 285 : Base(t)
277 { 286 {
278 } 287 }
279 288
280 virtual ~WebTestProxy() { } 289 virtual ~WebTestProxy() { }
281 290
282 // WebViewClient implementation. 291 // WebViewClient implementation.
283 virtual void didInvalidateRect(const WebKit::WebRect& rect) 292 virtual void didInvalidateRect(const WebKit::WebRect& rect)
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 } 601 }
593 virtual bool runFileChooser(const WebKit::WebFileChooserParams& params, WebK it::WebFileChooserCompletion* completion) 602 virtual bool runFileChooser(const WebKit::WebFileChooserParams& params, WebK it::WebFileChooserCompletion* completion)
594 { 603 {
595 return WebTestProxyBase::runFileChooser(params, completion); 604 return WebTestProxyBase::runFileChooser(params, completion);
596 } 605 }
597 }; 606 };
598 607
599 } 608 }
600 609
601 #endif // WebTestProxy_h 610 #endif // WebTestProxy_h
OLDNEW
« no previous file with comments | « public/testing/WebFrameTestProxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698