From 31e6697c5856ed1d3d79e457dccbf4a1078cb74b Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Thu, 3 Jul 2014 17:58:29 +0400 Subject: [PATCH] Build: Add "timers_ie.js" file back to the repo --- external/sinon/timers_ie.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 external/sinon/timers_ie.js diff --git a/external/sinon/timers_ie.js b/external/sinon/timers_ie.js new file mode 100644 index 000000000..fe8f399c6 --- /dev/null +++ b/external/sinon/timers_ie.js @@ -0,0 +1,31 @@ +/*global sinon, setTimeout, setInterval, clearTimeout, clearInterval, Date*/ +/** + * Helps IE run the fake timers. By defining global functions, IE allows + * them to be overwritten at a later point. If these are not defined like + * this, overwriting them will result in anything from an exception to browser + * crash. + * + * If you don't require fake timers to work in IE, don't include this file. + * + * @author Christian Johansen (christian@cjohansen.no) + * @license BSD + * + * Copyright (c) 2010-2013 Christian Johansen + */ +function setTimeout() {} +function clearTimeout() {} +function setImmediate() {} +function clearImmediate() {} +function setInterval() {} +function clearInterval() {} +function Date() {} + +// Reassign the original functions. Now their writable attribute +// should be true. Hackish, I know, but it works. +setTimeout = sinon.timers.setTimeout; +clearTimeout = sinon.timers.clearTimeout; +setImmediate = sinon.timers.setImmediate; +clearImmediate = sinon.timers.clearImmediate; +setInterval = sinon.timers.setInterval; +clearInterval = sinon.timers.clearInterval; +Date = sinon.timers.Date; -- 2.39.5