aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-05-15 12:32:27 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-05-15 12:32:27 -0700
commitafed8b5259db9f5a7e9a417c13669f29d8ae3d15 (patch)
tree44ca920e2bebc11570cb1f9cec8a47225703a3f3 /tests
parentd470387f096d6427720a9c8a61776fa3d276683e (diff)
support const methods, not just attributes, in webidl binder
Diffstat (limited to 'tests')
-rw-r--r--tests/webidl/output.txt1
-rw-r--r--tests/webidl/post.js1
-rw-r--r--tests/webidl/test.h1
-rw-r--r--tests/webidl/test.idl1
4 files changed, 4 insertions, 0 deletions
diff --git a/tests/webidl/output.txt b/tests/webidl/output.txt
index af3b0087..c029935f 100644
--- a/tests/webidl/output.txt
+++ b/tests/webidl/output.txt
@@ -1,6 +1,7 @@
Parent:42
*
84
+object
c1
Parent:7
Child1:7
diff --git a/tests/webidl/post.js b/tests/webidl/post.js
index 8056a5ff..5376f27b 100644
--- a/tests/webidl/post.js
+++ b/tests/webidl/post.js
@@ -6,6 +6,7 @@ sme.mulVal(2);
Module.print('*')
Module.print(sme.getVal());
sme.parentFunc(90);
+Module.print(typeof sme.getAsConst());
Module.print('c1');
diff --git a/tests/webidl/test.h b/tests/webidl/test.h
index d8eb0fbc..5d13846c 100644
--- a/tests/webidl/test.h
+++ b/tests/webidl/test.h
@@ -11,6 +11,7 @@ public:
int getVal() { return value; }; // inline should work just fine here, unlike Way 1 before
void mulVal(int mul);
void parentFunc() {}
+ const Parent *getAsConst() { return NULL; }
};
class Child1 : public Parent {
diff --git a/tests/webidl/test.idl b/tests/webidl/test.idl
index 6d87d5e3..8ee82b76 100644
--- a/tests/webidl/test.idl
+++ b/tests/webidl/test.idl
@@ -6,6 +6,7 @@ interface Parent {
long getVal();
void mulVal(long mul);
void parentFunc();
+ [Const] Parent getAsConst();
};
interface Child1 {