Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(45)

Unified Diff: gears/test/testcases/database2_tests.js

Issue 717: Database2Values, argument conversion implemented (Closed) SVN Base: http://google-gears.googlecode.com/svn/contrib/dimitri.glazkov/database2/
Patch Set: Created 3 months, 2 weeks ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: gears/test/testcases/database2_tests.js
===================================================================
--- gears/test/testcases/database2_tests.js (revision 1609)
+++ gears/test/testcases/database2_tests.js (working copy)
@@ -136,6 +136,21 @@
// valid arguments
tx.executeSql('SELECT * FROM Pages WHERE pageId = ? and version = ?',
[ 1972, '1.0.0.0' ]);
+ // arguments with null
+ tx.executeSql('SELECT * FROM Pages WHERE pageId = ? and version = ?',
+ [ 1972, null ]);
+ // null arguments
+ tx.executeSql('SELECT * FROM Pages', null);
+ // invalid arguments: function
+ assertError(function() {
+ tx.executeSql('SELECT * FROM Pages WHERE pageId = ? and version = ?',
+ [ function() {}, '1.0.0.0' ]);
+ }, null, 'Function arguments are not allowed');
+ // invalid arguments: object
+ assertError(function() {
+ tx.executeSql('SELECT * FROM Pages WHERE pageId = ? and version = ?',
+ [ { you: 'is wrong' }, '1.0.0.0' ]);
+ }, null, 'Function arguments are not allowed');
});
});
}
« gears/database2/statement.h ('k') | no next file »

Powered by Google App Engine
This is Rietveld r292