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

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

Issue 3029001: When I specified the rlz chrome extension api, I explicitly did not include a... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 function getAccessPointRlz() { 100 function getAccessPointRlz() {
101 // Using an access point different then those used above so that if the 101 // Using an access point different then those used above so that if the
102 // clearProductState() test runs before this one it does not clear the 102 // clearProductState() test runs before this one it does not clear the
103 // rlz string tested for here. 103 // rlz string tested for here.
104 chrome.experimental.rlz.getAccessPointRlz('D1', function(rlzString) { 104 chrome.experimental.rlz.getAccessPointRlz('D1', function(rlzString) {
105 chrome.test.assertEq('rlz_apitest', rlzString); 105 chrome.test.assertEq('rlz_apitest', rlzString);
106 chrome.test.succeed(); 106 chrome.test.succeed();
107 }); 107 });
108 }, 108 },
109
110 function sendFinancialPing() {
111 // Bad product.
112 try {
113 chrome.experimental.rlz.sendFinancialPing('', ['D3'], 'sig', 'TEST',
114 'id', 'en', false);
115 // Should not reach this line since the above call throws.
116 chrome.test.fail();
117 } catch(ex) {
118 }
119
120 // Bad access point list.
121 try {
122 chrome.experimental.rlz.sendFinancialPing('D', null, 'sig', 'TEST',
123 'id', 'en', false);
124 // Should not reach this line since the above call throws.
125 chrome.test.fail();
126 } catch(ex) {
127 }
128
129 // Bad access point list.
130 try {
131 chrome.experimental.rlz.sendFinancialPing('D', [], 'sig', 'TEST',
132 'id', 'en', false);
133 // Should not reach this line since the above call throws.
134 chrome.test.fail();
135 } catch(ex) {
136 }
137
138 // Valid call.
139 chrome.experimental.rlz.sendFinancialPing('D', ['D3'], 'sig', 'TEST',
140 'id', 'en', false);
141
142 chrome.test.succeed();
143 }
109 ]); 144 ]);
110 145
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/extension_api.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698