Bug 140945 - [Win] Layout Test js/date-constructor.html is failing
Summary: [Win] Layout Test js/date-constructor.html is failing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-01-27 11:37 PST by Brent Fulgham
Modified: 2018-04-18 13:09 PDT (History)
13 users (show)

See Also:


Attachments
Patch (2.74 KB, patch)
2018-04-17 18:36 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (4.64 KB, patch)
2018-04-17 18:40 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2015-01-27 11:37:28 PST
The following layout test is failing on Windows

js/date-constructor.html

Failure output:

--- /cygdrive/c/Projects/WebKit/OpenSource/WebKitBuild/Release/bin32/layout-test-results/js/date-constructor-expected.txt
+++ /cygdrive/c/Projects/WebKit/OpenSource/WebKitBuild/Release/bin32/layout-test-results/js/date-constructor-actual.txt
@@ -38,7 +38,9 @@
 PASS new Date(Date.parse('1 Mar 1000 GMT')).toGMTString() is "Sat, 01 Mar 1000 00:00:00 GMT"
 PASS testStr is "1234567"
 PASS testStr is "1234567"
-PASS leapTestResult is true
+WARN: shouldBe() expects string arguments
+FAIL new Date(August 15, 101).getDate() should be 15. Threw exception SyntaxError: Unexpected number '15'. Expected ')' to end a argument list.
+FAIL leapTestResult should be true. Was false.
 PASS successfullyParsed is true
 
 TEST COMPLETE
Comment 1 Radar WebKit Bug Importer 2015-01-27 11:38:19 PST
<rdar://problem/19617672>
Comment 2 Brent Fulgham 2015-01-28 12:51:11 PST
Could be due to Bug 140917.
Comment 3 Ross Kirsling 2018-04-17 18:30:39 PDT
More pointedly:
- `new Date("January 15, 2001")` prints "Mon Jan 15 2001 00:00:00 GMT-0800 (Pacific Standard Time)" (expected)
- `new Date("August 15, 2001")` prints "Tue Aug 14 2001 00:00:00 GMT-3100 (Pacific Daylight Time)" (unexpected)

It seems that we're not checking for a negative diff in calculateDSTOffset on Windows.
Comment 4 Ross Kirsling 2018-04-17 18:36:00 PDT
Created attachment 338176 [details]
Patch
Comment 5 Ross Kirsling 2018-04-17 18:40:52 PDT
Created attachment 338178 [details]
Patch
Comment 6 Per Arne Vollan 2018-04-18 12:38:23 PDT
Comment on attachment 338178 [details]
Patch

R=me.
Comment 7 WebKit Commit Bot 2018-04-18 13:09:29 PDT
Comment on attachment 338178 [details]
Patch

Clearing flags on attachment: 338178

Committed r230774: <https://trac.webkit.org/changeset/230774>
Comment 8 WebKit Commit Bot 2018-04-18 13:09:31 PDT
All reviewed patches have been landed.  Closing bug.