Index: mojo/apps/js/bindings/monotonic_clock_unittests.js |
diff --git a/mojo/apps/js/bindings/monotonic_clock_unittests.js b/mojo/apps/js/bindings/monotonic_clock_unittests.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a1a253ed68efd3c45747752ecbeb8bcd3f35aac0 |
--- /dev/null |
+++ b/mojo/apps/js/bindings/monotonic_clock_unittests.js |
@@ -0,0 +1,20 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+define([ |
+ "console", |
+ "gin/test/expect", |
+ "monotonic_clock", |
+ "timer", |
+ "mojo/apps/js/bindings/threading" |
+], function(console, expect, monotonicClock, timer, threading) { |
+ var global = this; |
+ var then = monotonicClock.seconds(); |
+ var t = timer.createOneShot(100, function() { |
+ var now = monotonicClock.seconds(); |
+ expect(now).toBeGreaterThan(then); |
+ global.result = "PASS"; |
+ threading.quit(); |
+ }); |
+}); |