Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: chrome/test/data/extensions/api_test/rlz/test.js

Issue 9699054: rlz: Hook up on mac, switch to chrome's network stack on win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« chrome/browser/rlz/rlz.cc ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // RLZ api test 5 // RLZ api test
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.Rlz 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.Rlz
7 7
8 // If this code changes, then the corresponding code in extension_rlz_apitest.cc 8 // If this code changes, then the corresponding code in extension_rlz_apitest.cc
9 // also needs to change. 9 // also needs to change.
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 chrome.experimental.rlz.sendFinancialPing('D', [], 'sig', 'TEST', 131 chrome.experimental.rlz.sendFinancialPing('D', [], 'sig', 'TEST',
132 'id', 'en', false); 132 'id', 'en', false);
133 // Should not reach this line since the above call throws. 133 // Should not reach this line since the above call throws.
134 chrome.test.fail(); 134 chrome.test.fail();
135 } catch(ex) { 135 } catch(ex) {
136 } 136 }
137 137
138 // Valid call. Should send a ping. 138 // Valid call. Should send a ping.
139 chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST', 139 chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
140 'id', 'en', false, 140 'id', 'en', false,
141 function(sent) { 141 function(sent) {
142 if (sent) { 142 if (sent) {
143 chrome.test.succeed(); 143 chrome.test.succeed();
144 } else { 144 } else {
145 chrome.test.fail(); 145 chrome.test.fail();
146 } 146 }
147 });
148 147
149 // Try another call, this time the ping should not be sent. 148 // Try another call, this time the ping should not be sent.
150 chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST', 149 chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
151 'id', 'en', false, 150 'id', 'en', false,
152 function(sent) { 151 function(sent) {
153 if (sent) { 152 if (sent) {
154 chrome.test.fail(); 153 chrome.test.fail();
155 } else { 154 } else {
156 chrome.test.succeed(); 155 chrome.test.succeed();
157 } 156 }
158 }); 157 });
158 });
159 159
160 // Valid call. Test that callback does not need to be specified. 160 // Valid call. Test that callback does not need to be specified.
161 chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST', 161 chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
162 'id', 'en', false); 162 'id', 'en', false);
163 } 163 }
164 ]); 164 ]);
OLDNEW
« chrome/browser/rlz/rlz.cc ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698