Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / echo / component_extension / test.js
blobc364d86a9c85d12d28795d3337d070f2781e2a92
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
3 // found in the LICENSE file.
5 chrome.test.runTests([
6   function getRegistrationCodeTest() {
7     var expected_code = '';
8     // TODO(gauravsh): Mock out StatisticsProvider to make getCouponCode()
9     // return a well known value for brower_tests.
10     chrome.echoPrivate.getRegistrationCode('COUPON_CODE',
11         chrome.test.callbackPass(function(result) {
12       chrome.test.assertTrue(result == expected_code);
13     }));
14     chrome.echoPrivate.getRegistrationCode('GROUP_CODE',
15         chrome.test.callbackPass(function(result) {
16       chrome.test.assertTrue(result == expected_code);
17     }));
18     chrome.echoPrivate.getRegistrationCode('INVALID_CODE',
19         chrome.test.callbackPass(function(result) {
20       chrome.test.assertTrue(result == '');
21     }));
22     chrome.echoPrivate.getOobeTimestamp(
23         chrome.test.callbackPass(function(result) {
24       chrome.test.assertTrue(result == '');
25     }));
26   }
27 ]);