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

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

Issue 12147004: Disable/enable echo for enterprise device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add the missing SendResponse call to the async extension method. Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 chrome.test.runTests([ 5 chrome.test.runTests([
6 function getRegistrationCodeTest() { 6 function getRegistrationCodeTest() {
7 var expected_code = ''; 7 var expected_code = '';
8 // TODO(gauravsh): Mock out StatisticsProvider to make getCouponCode() 8 // TODO(gauravsh): Mock out StatisticsProvider to make getCouponCode()
9 // return a well known value for brower_tests. 9 // return a well known value for brower_tests.
10 chrome.echoPrivate.getRegistrationCode('COUPON_CODE', 10 chrome.echoPrivate.getRegistrationCode('COUPON_CODE',
11 chrome.test.callbackPass(function(result) { 11 chrome.test.callbackPass(function(result) {
12 chrome.test.assertTrue(result == expected_code); 12 chrome.test.assertTrue(result == expected_code);
13 })); 13 }));
14 chrome.echoPrivate.getRegistrationCode('GROUP_CODE', 14 chrome.echoPrivate.getRegistrationCode('GROUP_CODE',
15 chrome.test.callbackPass(function(result) { 15 chrome.test.callbackPass(function(result) {
16 chrome.test.assertTrue(result == expected_code); 16 chrome.test.assertTrue(result == expected_code);
17 })); 17 }));
18 chrome.echoPrivate.getRegistrationCode('INVALID_CODE', 18 chrome.echoPrivate.getRegistrationCode('INVALID_CODE',
19 chrome.test.callbackPass(function(result) { 19 chrome.test.callbackPass(function(result) {
20 chrome.test.assertTrue(result == ''); 20 chrome.test.assertTrue(result == '');
21 })); 21 }));
22 chrome.echoPrivate.getOobeTimestamp( 22 chrome.echoPrivate.getOobeTimestamp(
23 chrome.test.callbackPass(function(result) { 23 chrome.test.callbackPass(function(result) {
24 chrome.test.assertTrue(result == ''); 24 chrome.test.assertTrue(result == '');
25 })); 25 }));
26 chrome.echoPrivate.checkAllowRedeemOffers(
27 chrome.test.callbackPass(function(result) {
28 chrome.test.assertTrue(result);
29 }));
26 } 30 }
27 ]); 31 ]);
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/echo_private.json ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698