Bug 1379200 - Preserve the precision of a timestamp when converting it to string. r=bkelly, a=test-only
authorHo-Pang Hsu <hopang.hsu@gmail.com>
Tue, 12 Sep 2017 11:01:41 +0800
changeset 424072 fc985a161026f2e0ddeaf9b31c54d98226182c05
parent 424071 606b48a1cd7a45cb62069ee0cf5a2e756fbb6a29
child 424073 d087540c96b5da7417824dcb6ae7014594f20d94
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly, test-only
bugs1379200
milestone56.0
Bug 1379200 - Preserve the precision of a timestamp when converting it to string. r=bkelly, a=test-only
testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py
testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker.py
--- a/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py
+++ b/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker-imported-script.py
@@ -5,15 +5,15 @@ def main(request, response):
                ('Cache-Control', 'max-age=0')]
 
     imported_content_type = ''
     if 'imported' in request.GET:
         imported_content_type = request.GET['imported']
 
     imported_content = 'default'
     if imported_content_type == 'time':
-        imported_content = time.time()
+        imported_content = '%f' % time.time()
 
     body = '''
     // %s
     ''' % (imported_content)
 
     return headers, body
--- a/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker.py
+++ b/testing/web-platform/tests/service-workers/service-worker/resources/bytecheck-worker.py
@@ -5,17 +5,17 @@ def main(request, response):
                ('Cache-Control', 'max-age=0')]
 
     main_content_type = ''
     if 'main' in request.GET:
         main_content_type = request.GET['main']
 
     main_content = 'default'
     if main_content_type == 'time':
-        main_content = time.time()
+        main_content = '%f' % time.time()
 
     imported_request_path = ''
     if 'path' in request.GET:
         imported_request_path = request.GET['path']
 
     imported_request_type = ''
     if 'imported' in request.GET:
         imported_request_type = request.GET['imported']