Chromium Code Reviews| Index: chrome/test/pyautolib/pyautolib.i |
| =================================================================== |
| --- chrome/test/pyautolib/pyautolib.i (revision 124219) |
| +++ chrome/test/pyautolib/pyautolib.i (working copy) |
| @@ -17,6 +17,8 @@ |
| %module(docstring="Python interface to Automation Proxy.") pyautolib |
| %feature("autodoc", "1"); |
| +%include "typemaps.i" |
| +%include "cpointer.i" |
|
dennis_jeffrey
2012/02/29 23:37:13
I'm not very familiar with swig syntax. Is there
dyu1
2012/03/05 19:16:46
It works with angle brackets as well but I just us
|
| %include <std_wstring.i> |
| %include <std_string.i> |
| @@ -30,6 +32,10 @@ |
| %include "chrome/app/chrome_dll_resource.h" |
| %include "chrome/common/automation_constants.h" |
| %include "chrome/common/pref_names.h" |
| +%include "content/public/common/page_type.h" |
| +%include "content/public/common/security_style.h" |
| +%include "net/base/net_export.h" |
| +%include "net/base/cert_status_flags.h" |
|
dennis_jeffrey
2012/02/29 23:37:13
swap the above 2 lines to put them in alphabetical
dyu1
2012/03/05 19:16:46
If I swap the two include lines from above I get a
|
| %{ |
| #include "chrome/common/automation_constants.h" |
| @@ -147,6 +153,22 @@ |
| "button, if false to 'Take me out of there' button.") |
|
dennis_jeffrey
2012/02/29 23:37:13
indent the above 2 lines by 1 more space each to b
dyu1
2012/03/05 19:16:46
Done.
|
| TakeActionOnSSLBlockingPage; |
| bool TakeActionOnSSLBlockingPage(bool proceed); |
| + %extend { |
| + %feature("docstring", "Retrieves the different security states for the current tab.") |
|
anantha
2012/02/29 22:30:02
Indentation doesn't look correct. Can you please c
dennis_jeffrey
2012/02/29 23:37:13
Take a look at how other long docstrings are speci
dyu1
2012/03/05 19:16:46
Done.
dyu1
2012/03/05 19:16:46
Done.
|
| + GetSecurityState; |
|
dennis_jeffrey
2012/02/29 23:37:13
this can probably be moved to the line above, like
dyu1
2012/03/05 19:16:46
In the examples I see, these are added after the d
|
| + bool GetSecurityState(int *security_style, uint32 *ssl_cert_status, |
|
dennis_jeffrey
2012/02/29 23:37:13
move the * over so that it touches the type:
int*
Nirnimesh
2012/02/29 23:41:08
use int*, not int *
(ie, * should go with the type
dyu1
2012/03/05 19:16:46
The Swig doc actually shows the examples this way.
dyu1
2012/03/05 19:16:46
Done.
|
| + int * insecure_content_status) { |
|
dennis_jeffrey
2012/02/29 23:37:13
same comment as line 159 above. Also do the same
Nirnimesh
2012/02/29 23:41:08
int*
dyu1
2012/03/05 19:16:46
Done.
dyu1
2012/03/05 19:16:46
Done.
|
| + return $self->GetSecurityState(reinterpret_cast<content::SecurityStyle *>(security_style), |
|
Nirnimesh
2012/02/29 23:41:08
reduce to 80 chars per line
Nirnimesh
2012/02/29 23:41:08
Wouldn't it have been easier to implement the meth
dyu1
2012/03/05 19:16:46
Done.
dyu1
2012/03/05 19:16:46
Done.
dyu1
2012/03/05 19:16:46
This is now done. It wasn't easy to implement as t
|
| + reinterpret_cast<net::CertStatus *>(ssl_cert_status), insecure_content_status); |
| + } |
| + } |
| + %extend { |
| + %feature("docstring", "Returns the type of page currently showing (normal, interstitial, error.") |
|
dennis_jeffrey
2012/02/29 23:37:13
Make sure lines 161, 162, and 166 don't exceed 80
dyu1
2012/03/05 19:16:46
Done.
|
| + GetPageType; |
| + bool GetPageType(int *OUTPUT) { |
|
dennis_jeffrey
2012/02/29 23:37:13
OUTPUT --> output
dyu1
2012/03/05 19:16:46
OUTPUT variable is actually a typemap and it canno
|
| + return $self->GetPageType(reinterpret_cast<content::PageType *>(OUTPUT)); |
| + } |
| + } |
| // HTTP Auth |
| %feature("docstring", |
| @@ -475,3 +497,5 @@ |
| %{ |
| typedef net::TestServer::HTTPSOptions HTTPSOptions; |
| %} |
| +%pointer_class(int, intp); |
|
Nirnimesh
2012/02/29 23:41:08
intp -> int_ptr
dyu1
2012/03/05 19:16:46
Done.
|
| +%pointer_class(uint32, uint32p); |
|
dennis_jeffrey
2012/02/29 23:37:13
Just curious: what do these %pointer lines do? Ar
Nirnimesh
2012/02/29 23:41:08
uint32p -> uint32_ptr
dyu1
2012/03/05 19:16:46
Done.
dyu1
2012/03/05 19:16:46
They are required to dereference constants like th
|