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

Side by Side Diff: chrome/test/data/webui/test_api.js

Issue 19822007: Updated Google Now to Check the Geolocation Access Preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@r213016
Patch Set: Sync and Resolve Conflicts Created 7 years, 4 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
« no previous file with comments | « chrome/browser/resources/google_now/utility.js ('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) 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 /** 5 /**
6 * @fileoverview Library providing basic test framework functionality. 6 * @fileoverview Library providing basic test framework functionality.
7 */ 7 */
8 8
9 /** 9 /**
10 * Namespace for |Test|. 10 * Namespace for |Test|.
(...skipping 1582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 * callback once the mocked function is called. 1593 * callback once the mocked function is called.
1594 * @param {number} callbackParameter Index of the callback parameter in 1594 * @param {number} callbackParameter Index of the callback parameter in
1595 * |savedArgs|. 1595 * |savedArgs|.
1596 * @param {...Object} var_args Arguments to pass to the callback. 1596 * @param {...Object} var_args Arguments to pass to the callback.
1597 * @return {CallFunctionAction} Action for use in will(). 1597 * @return {CallFunctionAction} Action for use in will().
1598 */ 1598 */
1599 function invokeCallback(savedArgs, callbackParameter, var_args) { 1599 function invokeCallback(savedArgs, callbackParameter, var_args) {
1600 var callbackArguments = Array.prototype.slice.call(arguments, 2); 1600 var callbackArguments = Array.prototype.slice.call(arguments, 2);
1601 return callFunction(function() { 1601 return callFunction(function() {
1602 savedArgs.arguments[callbackParameter].apply(null, callbackArguments); 1602 savedArgs.arguments[callbackParameter].apply(null, callbackArguments);
1603
1604 // Mock4JS does not clear the saved args after invocation.
1605 // To allow reuse of the same SaveMockArguments for multiple
1606 // invocations with similar arguments, clear them here.
1607 savedArgs.arguments.splice(0, savedArgs.arguments.length);
1603 }); 1608 });
1604 } 1609 }
1605 1610
1606 /** 1611 /**
1607 * Mock4JS matcher object that matches the actual agrument and the expected 1612 * Mock4JS matcher object that matches the actual agrument and the expected
1608 * value iff their JSON represenations are same. 1613 * value iff their JSON represenations are same.
1609 * @param {Object} expectedValue Expected value. 1614 * @param {Object} expectedValue Expected value.
1610 * @constructor 1615 * @constructor
1611 */ 1616 */
1612 function MatchJSON(expectedValue) { 1617 function MatchJSON(expectedValue) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 exports.TEST = TEST; 1691 exports.TEST = TEST;
1687 exports.TEST_F = TEST_F; 1692 exports.TEST_F = TEST_F;
1688 exports.RUNTIME_TEST_F = TEST_F; 1693 exports.RUNTIME_TEST_F = TEST_F;
1689 exports.GEN = GEN; 1694 exports.GEN = GEN;
1690 exports.GEN_INCLUDE = GEN_INCLUDE; 1695 exports.GEN_INCLUDE = GEN_INCLUDE;
1691 exports.WhenTestDone = WhenTestDone; 1696 exports.WhenTestDone = WhenTestDone;
1692 1697
1693 // Import the Mock4JS helpers. 1698 // Import the Mock4JS helpers.
1694 Mock4JS.addMockSupport(exports); 1699 Mock4JS.addMockSupport(exports);
1695 })(this); 1700 })(this);
OLDNEW
« no previous file with comments | « chrome/browser/resources/google_now/utility.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698