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

Unified Diff: LayoutTests/fast/harness/should-be-now.html

Issue 80983002: File constructor understands lastModified. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added isolate to v8::Date::New to avoid deprecation warning. Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/harness/should-be-now.html
diff --git a/LayoutTests/fast/harness/should-be-now.html b/LayoutTests/fast/harness/should-be-now.html
index f60a549c425a2eb944505c5411b05d69d9a7cae1..036461348887840f68facad63f38802c49e0290f 100644
--- a/LayoutTests/fast/harness/should-be-now.html
+++ b/LayoutTests/fast/harness/should-be-now.html
@@ -31,6 +31,26 @@ stubDateNow(60000, function() {
shouldBeNow("70000");
});
+debug("Testing a slightly past date with the implicit delta. This should pass.");
+stubDateNow(60000, function() {
+ shouldBeNow("59990");
+});
+
+debug("Testing a slightly future date with the implicit delta. This should pass.");
+stubDateNow(60000, function() {
+ shouldBeNow("60010");
+});
+
+debug("Testing a past date with a large delta. This should pass.");
+stubDateNow(60000, function() {
+ shouldBeNow("50000", 10000);
+});
+
+debug("Testing a future date with a large delta. This should pass.");
+stubDateNow(60000, function() {
+ shouldBeNow("70000", 10000);
+});
+
debug("Simulating a defective clock that always goes backwards. The test below should fail.");
var badClock = Date.now();
var realDateNow = Date.now;
« no previous file with comments | « LayoutTests/fast/files/file-constructor-expected.txt ('k') | LayoutTests/fast/harness/should-be-now-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698