X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2FProxy.js;h=9ffc38525fa04a66ac65a4b32f1b39b1fcae8523;hb=1d2021b5a18294d549b3fe076bf9f2fa0d152eea;hp=51a6e949fc8190c69154708a62ecfa696cf512f5;hpb=644eff8b76ca1a39ac2841d4f76a46a32042f071;p=dygraphs.git diff --git a/auto_tests/tests/Proxy.js b/auto_tests/tests/Proxy.js index 51a6e94..9ffc385 100644 --- a/auto_tests/tests/Proxy.js +++ b/auto_tests/tests/Proxy.js @@ -1,4 +1,4 @@ -// Copyright (c) 2011 Google, Inc. +// Copyright (c) 2011 Google, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -38,7 +38,7 @@ var Proxy = function(delegate) { function makeFunc(name) { return function() { this.log__(name, arguments); - this.delegate__[name].apply(this.delegate__, arguments); + return this.delegate__[name].apply(this.delegate__, arguments); } }; this[propname] = makeFunc(propname); @@ -72,3 +72,6 @@ Proxy.prototype.log__ = function(name, args) { this.calls__.push(call); }; +Proxy.reset = function(proxy) { + proxy.calls__ = []; +}