summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorrogerta@google.com <rogerta@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 19:01:49 +0000
committerrogerta@google.com <rogerta@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 19:01:49 +0000
commit772d548d6997833e9d4cd2d5649a6aadcad30124 (patch)
tree7e80fa57741aa43540b3c2af37c258983dac09fc /chrome/test
parentfbeec7b0ca0085d379da8672d887d11c4eea0298 (diff)
downloadchromium_src-772d548d6997833e9d4cd2d5649a6aadcad30124.zip
chromium_src-772d548d6997833e9d4cd2d5649a6aadcad30124.tar.gz
chromium_src-772d548d6997833e9d4cd2d5649a6aadcad30124.tar.bz2
Don't use the return value of rlz_lib::SendFinancialPing() as the return value
of the chrome extension API, since a false does not represent an error. Added an optional callback to the API so that caller can determine if the ping was sent or not. This CL is to reapply change 58827, which was reverted due to a test break. I found an uninitialized variable in the underlying RLZ code, see http://code.google.com/p/rlz/source/detail?r=18 for the fix. This CL includes a bump of the RLZ library to get this fix. The tests have been expanded a bit too since 58827. BUG=54294 TEST=n/a Review URL: http://codereview.chromium.org/3350016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/data/extensions/api_test/rlz/test.js27
1 files changed, 23 insertions, 4 deletions
diff --git a/chrome/test/data/extensions/api_test/rlz/test.js b/chrome/test/data/extensions/api_test/rlz/test.js
index 6fb4239..1214b6d 100644
--- a/chrome/test/data/extensions/api_test/rlz/test.js
+++ b/chrome/test/data/extensions/api_test/rlz/test.js
@@ -135,11 +135,30 @@ chrome.test.runTests([
} catch(ex) {
}
- // Valid call.
+ // Valid call. Should send a ping.
+ chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
+ 'id', 'en', false,
+ function(sent) {
+ if (sent) {
+ chrome.test.succeed();
+ } else {
+ chrome.test.fail();
+ }
+ });
+
+ // Try another call, this time the ping should not be sent.
+ chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
+ 'id', 'en', false,
+ function(sent) {
+ if (sent) {
+ chrome.test.fail();
+ } else {
+ chrome.test.succeed();
+ }
+ });
+
+ // Valid call. Test that callback does not need to be specified.
chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
'id', 'en', false);
-
- chrome.test.succeed();
}
]);
-