• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2015 Marshall A. Greenblatt. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions are
5 // met:
6 //
7 //    * Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer.
9 //    * Redistributions in binary form must reproduce the above
10 // copyright notice, this list of conditions and the following disclaimer
11 // in the documentation and/or other materials provided with the
12 // distribution.
13 //    * Neither the name of Google Inc. nor the name Chromium Embedded
14 // Framework nor the names of its contributors may be used to endorse
15 // or promote products derived from this software without specific prior
16 // written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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.
29 //
30 // ---------------------------------------------------------------------------
31 //
32 // The contents of this file must follow a specific format in order to
33 // support the CEF translator tool. See the translator.README.txt file in the
34 // tools directory for more information.
35 //
36 // THIS FILE IS FOR TESTING PURPOSES ONLY.
37 //
38 // The APIs defined in this file are for testing purposes only. They should only
39 // be included from unit test targets.
40 //
41 
42 #ifndef CEF_INCLUDE_TEST_CEF_TEST_H_
43 #define CEF_INCLUDE_TEST_CEF_TEST_H_
44 #pragma once
45 
46 #if !defined(BUILDING_CEF_SHARED) && !defined(WRAPPING_CEF_SHARED) && \
47     !defined(UNIT_TEST)
48 #error This file can be included for unit tests only
49 #endif
50 
51 #include <map>
52 #include <vector>
53 
54 #include "include/cef_base.h"
55 
56 class CefTranslatorTestRefPtrClient;
57 class CefTranslatorTestRefPtrClientChild;
58 class CefTranslatorTestRefPtrLibrary;
59 class CefTranslatorTestRefPtrLibraryChild;
60 class CefTranslatorTestScopedClient;
61 class CefTranslatorTestScopedClientChild;
62 class CefTranslatorTestScopedLibrary;
63 class CefTranslatorTestScopedLibraryChild;
64 
65 // Test values.
66 #define TEST_INT_VAL 5
67 #define TEST_INT_VAL2 60
68 #define TEST_BOOL_VAL true
69 #define TEST_DOUBLE_VAL 4.543
70 #define TEST_LONG_VAL -65
71 #define TEST_SIZET_VAL 3U
72 #define TEST_STRING_VAL "My test string"
73 #define TEST_STRING_VAL2 "My 2nd test string"
74 #define TEST_STRING_VAL3 "My 3rd test string"
75 #define TEST_STRING_KEY "key0"
76 #define TEST_STRING_KEY2 "key1"
77 #define TEST_STRING_KEY3 "key2"
78 #define TEST_X_VAL 44
79 #define TEST_Y_VAL 754
80 #define TEST_X_VAL2 900
81 #define TEST_Y_VAL2 300
82 
83 ///
84 // Class for testing all of the possible data transfer types.
85 ///
86 /*--cef(source=library)--*/
87 class CefTranslatorTest : public CefBaseRefCounted {
88  public:
89   ///
90   // Create the test object.
91   ///
92   /*--cef()--*/
93   static CefRefPtr<CefTranslatorTest> Create();
94 
95   // PRIMITIVE VALUES
96 
97   ///
98   // Return a void value.
99   ///
100   /*--cef()--*/
101   virtual void GetVoid() = 0;
102 
103   ///
104   // Return a bool value.
105   ///
106   /*--cef()--*/
107   virtual bool GetBool() = 0;
108 
109   ///
110   // Return an int value.
111   ///
112   /*--cef()--*/
113   virtual int GetInt() = 0;
114 
115   ///
116   // Return a double value.
117   ///
118   /*--cef()--*/
119   virtual double GetDouble() = 0;
120 
121   ///
122   // Return a long value.
123   ///
124   /*--cef()--*/
125   virtual long GetLong() = 0;
126 
127   ///
128   // Return a size_t value.
129   ///
130   /*--cef()--*/
131   virtual size_t GetSizet() = 0;
132 
133   ///
134   // Set a void value.
135   ///
136   /*--cef()--*/
137   virtual bool SetVoid() = 0;
138 
139   ///
140   // Set a bool value.
141   ///
142   /*--cef()--*/
143   virtual bool SetBool(bool val) = 0;
144 
145   ///
146   // Set an int value.
147   ///
148   /*--cef()--*/
149   virtual bool SetInt(int val) = 0;
150 
151   ///
152   // Set a double value.
153   ///
154   /*--cef()--*/
155   virtual bool SetDouble(double val) = 0;
156 
157   ///
158   // Set a long value.
159   ///
160   /*--cef()--*/
161   virtual bool SetLong(long val) = 0;
162 
163   ///
164   // Set a size_t value.
165   ///
166   /*--cef()--*/
167   virtual bool SetSizet(size_t val) = 0;
168 
169   // PRIMITIVE LIST VALUES
170 
171   // Test both with and without a typedef.
172   typedef std::vector<int> IntList;
173 
174   ///
175   // Set a int list value.
176   ///
177   /*--cef()--*/
178   virtual bool SetIntList(const std::vector<int>& val) = 0;
179 
180   ///
181   // Return an int list value by out-param.
182   ///
183   /*--cef(count_func=val:GetIntListSize)--*/
184   virtual bool GetIntListByRef(IntList& val) = 0;
185 
186   ///
187   // Return the number of points that will be output above.
188   ///
189   /*--cef()--*/
190   virtual size_t GetIntListSize() = 0;
191 
192   // STRING VALUES
193 
194   ///
195   // Return a string value.
196   ///
197   /*--cef()--*/
198   virtual CefString GetString() = 0;
199 
200   ///
201   // Set a string value.
202   ///
203   /*--cef()--*/
204   virtual bool SetString(const CefString& val) = 0;
205 
206   ///
207   // Return a string value by out-param.
208   ///
209   /*--cef()--*/
210   virtual void GetStringByRef(CefString& val) = 0;
211 
212   // STRING LIST VALUES
213 
214   // Test both with and without a typedef.
215   typedef std::vector<CefString> StringList;
216 
217   ///
218   // Set a string list value.
219   ///
220   /*--cef()--*/
221   virtual bool SetStringList(const std::vector<CefString>& val) = 0;
222 
223   ///
224   // Return a string list value by out-param.
225   ///
226   /*--cef()--*/
227   virtual bool GetStringListByRef(StringList& val) = 0;
228 
229   // STRING MAP VALUES
230 
231   // Test both with and without a typedef.
232   typedef std::map<CefString, CefString> StringMap;
233 
234   ///
235   // Set a string map value.
236   ///
237   /*--cef()--*/
238   virtual bool SetStringMap(const StringMap& val) = 0;
239 
240   ///
241   // Return a string map value by out-param.
242   ///
243   /*--cef()--*/
244   virtual bool GetStringMapByRef(std::map<CefString, CefString>& val) = 0;
245 
246   // STRING MULTIMAP VALUES
247 
248   // Test both with and without a typedef.
249   typedef std::multimap<CefString, CefString> StringMultimap;
250 
251   ///
252   // Set a string multimap value.
253   ///
254   /*--cef()--*/
255   virtual bool SetStringMultimap(
256       const std::multimap<CefString, CefString>& val) = 0;
257 
258   ///
259   // Return a string multimap value by out-param.
260   ///
261   /*--cef()--*/
262   virtual bool GetStringMultimapByRef(StringMultimap& val) = 0;
263 
264   // STRUCT VALUES
265 
266   ///
267   // Return a point value.
268   ///
269   /*--cef()--*/
270   virtual CefPoint GetPoint() = 0;
271 
272   ///
273   // Set a point value.
274   ///
275   /*--cef()--*/
276   virtual bool SetPoint(const CefPoint& val) = 0;
277 
278   ///
279   // Return a point value by out-param.
280   ///
281   /*--cef()--*/
282   virtual void GetPointByRef(CefPoint& val) = 0;
283 
284   // STRUCT LIST VALUES
285 
286   // Test both with and without a typedef.
287   typedef std::vector<CefPoint> PointList;
288 
289   ///
290   // Set a point list vlaue.
291   ///
292   /*--cef()--*/
293   virtual bool SetPointList(const std::vector<CefPoint>& val) = 0;
294 
295   ///
296   // Return a point list value by out-param.
297   ///
298   /*--cef(count_func=val:GetPointListSize)--*/
299   virtual bool GetPointListByRef(PointList& val) = 0;
300 
301   ///
302   // Return the number of points that will be output above.
303   ///
304   /*--cef()--*/
305   virtual size_t GetPointListSize() = 0;
306 
307   // LIBRARY-SIDE REFPTR VALUES
308 
309   ///
310   // Return an new library-side object.
311   ///
312   /*--cef()--*/
313   virtual CefRefPtr<CefTranslatorTestRefPtrLibrary> GetRefPtrLibrary(
314       int val) = 0;
315 
316   ///
317   // Set an object. Returns the value from
318   // CefTranslatorTestRefPtrLibrary::GetValue().
319   // This tests input and execution of a library-side object type.
320   ///
321   /*--cef()--*/
322   virtual int SetRefPtrLibrary(
323       CefRefPtr<CefTranslatorTestRefPtrLibrary> val) = 0;
324 
325   ///
326   // Set an object. Returns the object passed in. This tests input and output
327   // of a library-side object type.
328   ///
329   /*--cef()--*/
330   virtual CefRefPtr<CefTranslatorTestRefPtrLibrary> SetRefPtrLibraryAndReturn(
331       CefRefPtr<CefTranslatorTestRefPtrLibrary> val) = 0;
332 
333   ///
334   // Set a child object. Returns the value from
335   // CefTranslatorTestRefPtrLibrary::GetValue(). This tests input of a library-
336   // side child object type and execution as the parent type.
337   ///
338   /*--cef()--*/
339   virtual int SetChildRefPtrLibrary(
340       CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) = 0;
341 
342   ///
343   // Set a child object. Returns the object as the parent type. This tests input
344   // of a library-side child object type and return as the parent type.
345   ///
346   /*--cef()--*/
347   virtual CefRefPtr<CefTranslatorTestRefPtrLibrary>
348   SetChildRefPtrLibraryAndReturnParent(
349       CefRefPtr<CefTranslatorTestRefPtrLibraryChild> val) = 0;
350 
351   // LIBRARY-SIDE REFPTR LIST VALUES
352 
353   // Test both with and without a typedef.
354   typedef std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary>>
355       RefPtrLibraryList;
356 
357   ///
358   // Set an object list vlaue.
359   ///
360   /*--cef()--*/
361   virtual bool SetRefPtrLibraryList(
362       const std::vector<CefRefPtr<CefTranslatorTestRefPtrLibrary>>& val,
363       int val1,
364       int val2) = 0;
365 
366   ///
367   // Return an object list value by out-param.
368   ///
369   /*--cef(count_func=val:GetRefPtrLibraryListSize)--*/
370   virtual bool GetRefPtrLibraryListByRef(RefPtrLibraryList& val,
371                                          int val1,
372                                          int val2) = 0;
373 
374   ///
375   // Return the number of object that will be output above.
376   ///
377   /*--cef()--*/
378   virtual size_t GetRefPtrLibraryListSize() = 0;
379 
380   // CLIENT-SIDE REFPTR VALUES
381 
382   ///
383   // Set an object. Returns the value from
384   // CefTranslatorTestRefPtrClient::GetValue().
385   // This tests input and execution of a client-side object type.
386   ///
387   /*--cef()--*/
388   virtual int SetRefPtrClient(CefRefPtr<CefTranslatorTestRefPtrClient> val) = 0;
389 
390   ///
391   // Set an object. Returns the handler passed in. This tests input and output
392   // of a client-side object type.
393   ///
394   /*--cef()--*/
395   virtual CefRefPtr<CefTranslatorTestRefPtrClient> SetRefPtrClientAndReturn(
396       CefRefPtr<CefTranslatorTestRefPtrClient> val) = 0;
397 
398   ///
399   // Set a child object. Returns the value from
400   // CefTranslatorTestRefPtrClient::GetValue(). This tests input of a client-
401   // side child object type and execution as the parent type.
402   ///
403   /*--cef()--*/
404   virtual int SetChildRefPtrClient(
405       CefRefPtr<CefTranslatorTestRefPtrClientChild> val) = 0;
406 
407   ///
408   // Set a child object. Returns the object as the parent type. This tests
409   // input of a client-side child object type and return as the parent type.
410   ///
411   /*--cef()--*/
412   virtual CefRefPtr<CefTranslatorTestRefPtrClient>
413   SetChildRefPtrClientAndReturnParent(
414       CefRefPtr<CefTranslatorTestRefPtrClientChild> val) = 0;
415 
416   // CLIENT-SIDE REFPTR LIST VALUES
417 
418   // Test both with and without a typedef.
419   typedef std::vector<CefRefPtr<CefTranslatorTestRefPtrClient>>
420       RefPtrClientList;
421 
422   ///
423   // Set an object list vlaue.
424   ///
425   /*--cef()--*/
426   virtual bool SetRefPtrClientList(
427       const std::vector<CefRefPtr<CefTranslatorTestRefPtrClient>>& val,
428       int val1,
429       int val2) = 0;
430 
431   ///
432   // Return an object list value by out-param.
433   ///
434   /*--cef(count_func=val:GetRefPtrLibraryListSize)--*/
435   virtual bool GetRefPtrClientListByRef(
436       RefPtrClientList& val,
437       CefRefPtr<CefTranslatorTestRefPtrClient> val1,
438       CefRefPtr<CefTranslatorTestRefPtrClient> val2) = 0;
439 
440   ///
441   // Return the number of object that will be output above.
442   ///
443   /*--cef()--*/
444   virtual size_t GetRefPtrClientListSize() = 0;
445 
446   // LIBRARY-SIDE OWNPTR VALUES
447 
448   ///
449   // Return an new library-side object.
450   ///
451   /*--cef()--*/
452   virtual CefOwnPtr<CefTranslatorTestScopedLibrary> GetOwnPtrLibrary(
453       int val) = 0;
454 
455   ///
456   // Set an object. Returns the value from
457   // CefTranslatorTestScopedLibrary::GetValue().
458   // This tests input and execution of a library-side object type.
459   ///
460   /*--cef()--*/
461   virtual int SetOwnPtrLibrary(
462       CefOwnPtr<CefTranslatorTestScopedLibrary> val) = 0;
463 
464   ///
465   // Set an object. Returns the object passed in. This tests input and output
466   // of a library-side object type.
467   ///
468   /*--cef()--*/
469   virtual CefOwnPtr<CefTranslatorTestScopedLibrary> SetOwnPtrLibraryAndReturn(
470       CefOwnPtr<CefTranslatorTestScopedLibrary> val) = 0;
471 
472   ///
473   // Set a child object. Returns the value from
474   // CefTranslatorTestScopedLibrary::GetValue(). This tests input of a library-
475   // side child object type and execution as the parent type.
476   ///
477   /*--cef()--*/
478   virtual int SetChildOwnPtrLibrary(
479       CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) = 0;
480 
481   ///
482   // Set a child object. Returns the object as the parent type. This tests input
483   // of a library-side child object type and return as the parent type.
484   ///
485   /*--cef()--*/
486   virtual CefOwnPtr<CefTranslatorTestScopedLibrary>
487   SetChildOwnPtrLibraryAndReturnParent(
488       CefOwnPtr<CefTranslatorTestScopedLibraryChild> val) = 0;
489 
490   // CLIENT-SIDE OWNPTR VALUES
491 
492   ///
493   // Set an object. Returns the value from
494   // CefTranslatorTestScopedClient::GetValue().
495   // This tests input and execution of a client-side object type.
496   ///
497   /*--cef()--*/
498   virtual int SetOwnPtrClient(CefOwnPtr<CefTranslatorTestScopedClient> val) = 0;
499 
500   ///
501   // Set an object. Returns the handler passed in. This tests input and output
502   // of a client-side object type.
503   ///
504   /*--cef()--*/
505   virtual CefOwnPtr<CefTranslatorTestScopedClient> SetOwnPtrClientAndReturn(
506       CefOwnPtr<CefTranslatorTestScopedClient> val) = 0;
507 
508   ///
509   // Set a child object. Returns the value from
510   // CefTranslatorTestScopedClient::GetValue(). This tests input of a client-
511   // side child object type and execution as the parent type.
512   ///
513   /*--cef()--*/
514   virtual int SetChildOwnPtrClient(
515       CefOwnPtr<CefTranslatorTestScopedClientChild> val) = 0;
516 
517   ///
518   // Set a child object. Returns the object as the parent type. This tests
519   // input of a client-side child object type and return as the parent type.
520   ///
521   /*--cef()--*/
522   virtual CefOwnPtr<CefTranslatorTestScopedClient>
523   SetChildOwnPtrClientAndReturnParent(
524       CefOwnPtr<CefTranslatorTestScopedClientChild> val) = 0;
525 
526   // LIBRARY-SIDE RAWPTR VALUES
527 
528   ///
529   // Set an object. Returns the value from
530   // CefTranslatorTestScopedLibrary::GetValue().
531   // This tests input and execution of a library-side object type.
532   ///
533   /*--cef()--*/
534   virtual int SetRawPtrLibrary(
535       CefRawPtr<CefTranslatorTestScopedLibrary> val) = 0;
536 
537   ///
538   // Set a child object. Returns the value from
539   // CefTranslatorTestScopedLibrary::GetValue(). This tests input of a library-
540   // side child object type and execution as the parent type.
541   ///
542   /*--cef()--*/
543   virtual int SetChildRawPtrLibrary(
544       CefRawPtr<CefTranslatorTestScopedLibraryChild> val) = 0;
545 
546   // LIBRARY-SIDE RAWPTR LIST VALUES
547 
548   // Test both with and without a typedef.
549   typedef std::vector<CefRawPtr<CefTranslatorTestScopedLibrary>>
550       RawPtrLibraryList;
551 
552   ///
553   // Set an object list vlaue.
554   ///
555   /*--cef()--*/
556   virtual bool SetRawPtrLibraryList(
557       const std::vector<CefRawPtr<CefTranslatorTestScopedLibrary>>& val,
558       int val1,
559       int val2) = 0;
560 
561   // CLIENT-SIDE RAWPTR VALUES
562 
563   ///
564   // Set an object. Returns the value from
565   // CefTranslatorTestScopedClient::GetValue().
566   // This tests input and execution of a client-side object type.
567   ///
568   /*--cef()--*/
569   virtual int SetRawPtrClient(CefRawPtr<CefTranslatorTestScopedClient> val) = 0;
570 
571   ///
572   // Set a child object. Returns the value from
573   // CefTranslatorTestScopedClient::GetValue(). This tests input of a client-
574   // side child object type and execution as the parent type.
575   ///
576   /*--cef()--*/
577   virtual int SetChildRawPtrClient(
578       CefRawPtr<CefTranslatorTestScopedClientChild> val) = 0;
579 
580   // CLIENT-SIDE RAWPTR LIST VALUES
581 
582   // Test both with and without a typedef.
583   typedef std::vector<CefRawPtr<CefTranslatorTestScopedClient>>
584       RawPtrClientList;
585 
586   ///
587   // Set an object list vlaue.
588   ///
589   /*--cef()--*/
590   virtual bool SetRawPtrClientList(
591       const std::vector<CefRawPtr<CefTranslatorTestScopedClient>>& val,
592       int val1,
593       int val2) = 0;
594 };
595 
596 ///
597 // Library-side test object for RefPtr.
598 ///
599 /*--cef(source=library)--*/
600 class CefTranslatorTestRefPtrLibrary : public CefBaseRefCounted {
601  public:
602   ///
603   // Create the test object.
604   ///
605   /*--cef()--*/
606   static CefRefPtr<CefTranslatorTestRefPtrLibrary> Create(int value);
607 
608   ///
609   // Return a value.
610   ///
611   /*--cef()--*/
612   virtual int GetValue() = 0;
613 
614   ///
615   // Set a value.
616   ///
617   /*--cef()--*/
618   virtual void SetValue(int value) = 0;
619 };
620 
621 ///
622 // Library-side child test object for RefPtr.
623 ///
624 /*--cef(source=library)--*/
625 class CefTranslatorTestRefPtrLibraryChild
626     : public CefTranslatorTestRefPtrLibrary {
627  public:
628   ///
629   // Create the test object.
630   ///
631   /*--cef()--*/
632   static CefRefPtr<CefTranslatorTestRefPtrLibraryChild> Create(int value,
633                                                                int other_value);
634 
635   ///
636   // Return a value.
637   ///
638   /*--cef()--*/
639   virtual int GetOtherValue() = 0;
640 
641   ///
642   // Set a value.
643   ///
644   /*--cef()--*/
645   virtual void SetOtherValue(int value) = 0;
646 };
647 
648 ///
649 // Another library-side child test object for RefPtr.
650 ///
651 /*--cef(source=library)--*/
652 class CefTranslatorTestRefPtrLibraryChildChild
653     : public CefTranslatorTestRefPtrLibraryChild {
654  public:
655   ///
656   // Create the test object.
657   ///
658   /*--cef()--*/
659   static CefRefPtr<CefTranslatorTestRefPtrLibraryChildChild>
660   Create(int value, int other_value, int other_other_value);
661 
662   ///
663   // Return a value.
664   ///
665   /*--cef()--*/
666   virtual int GetOtherOtherValue() = 0;
667 
668   ///
669   // Set a value.
670   ///
671   /*--cef()--*/
672   virtual void SetOtherOtherValue(int value) = 0;
673 };
674 
675 ///
676 // Client-side test object for RefPtr.
677 ///
678 /*--cef(source=client)--*/
679 class CefTranslatorTestRefPtrClient : public virtual CefBaseRefCounted {
680  public:
681   ///
682   // Return a value.
683   ///
684   /*--cef()--*/
685   virtual int GetValue() = 0;
686 };
687 
688 ///
689 // Client-side child test object for RefPtr.
690 ///
691 /*--cef(source=client)--*/
692 class CefTranslatorTestRefPtrClientChild
693     : public CefTranslatorTestRefPtrClient {
694  public:
695   ///
696   // Return a value.
697   ///
698   /*--cef()--*/
699   virtual int GetOtherValue() = 0;
700 };
701 
702 ///
703 // Library-side test object for OwnPtr/RawPtr.
704 ///
705 /*--cef(source=library)--*/
706 class CefTranslatorTestScopedLibrary : public CefBaseScoped {
707  public:
708   ///
709   // Create the test object.
710   ///
711   /*--cef()--*/
712   static CefOwnPtr<CefTranslatorTestScopedLibrary> Create(int value);
713 
714   ///
715   // Return a value.
716   ///
717   /*--cef()--*/
718   virtual int GetValue() = 0;
719 
720   ///
721   // Set a value.
722   ///
723   /*--cef()--*/
724   virtual void SetValue(int value) = 0;
725 };
726 
727 ///
728 // Library-side child test object for OwnPtr/RawPtr.
729 ///
730 /*--cef(source=library)--*/
731 class CefTranslatorTestScopedLibraryChild
732     : public CefTranslatorTestScopedLibrary {
733  public:
734   ///
735   // Create the test object.
736   ///
737   /*--cef()--*/
738   static CefOwnPtr<CefTranslatorTestScopedLibraryChild> Create(int value,
739                                                                int other_value);
740 
741   ///
742   // Return a value.
743   ///
744   /*--cef()--*/
745   virtual int GetOtherValue() = 0;
746 
747   ///
748   // Set a value.
749   ///
750   /*--cef()--*/
751   virtual void SetOtherValue(int value) = 0;
752 };
753 
754 ///
755 // Another library-side child test object for OwnPtr/RawPtr.
756 ///
757 /*--cef(source=library)--*/
758 class CefTranslatorTestScopedLibraryChildChild
759     : public CefTranslatorTestScopedLibraryChild {
760  public:
761   ///
762   // Create the test object.
763   ///
764   /*--cef()--*/
765   static CefOwnPtr<CefTranslatorTestScopedLibraryChildChild>
766   Create(int value, int other_value, int other_other_value);
767 
768   ///
769   // Return a value.
770   ///
771   /*--cef()--*/
772   virtual int GetOtherOtherValue() = 0;
773 
774   ///
775   // Set a value.
776   ///
777   /*--cef()--*/
778   virtual void SetOtherOtherValue(int value) = 0;
779 };
780 
781 ///
782 // Client-side test object for OwnPtr/RawPtr.
783 ///
784 /*--cef(source=client)--*/
785 class CefTranslatorTestScopedClient : public virtual CefBaseScoped {
786  public:
787   ///
788   // Return a value.
789   ///
790   /*--cef()--*/
791   virtual int GetValue() = 0;
792 };
793 
794 ///
795 // Client-side child test object for OwnPtr/RawPtr.
796 ///
797 /*--cef(source=client)--*/
798 class CefTranslatorTestScopedClientChild
799     : public CefTranslatorTestScopedClient {
800  public:
801   ///
802   // Return a value.
803   ///
804   /*--cef()--*/
805   virtual int GetOtherValue() = 0;
806 };
807 
808 #endif  // CEF_INCLUDE_TEST_CEF_TEST_H_
809