Skip to content

Commit 5af9d54

Browse files
authored
Merge pull request #942 from snoop168/lava-output-dev
Chrome Fix and TextInputSession Fix
2 parents d5d7889 + 6ab1cfe commit 5af9d54

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

scripts/artifacts/biomeTextinputses.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import blackboxprotobuf
2222
from scripts.ccl_segb.ccl_segb import read_segb_file
2323
from scripts.ccl_segb.ccl_segb_common import EntryState
24-
from scripts.ilapfuncs import artifact_processor, webkit_timestampsconv, convert_utc_human_to_timezone
24+
from scripts.ilapfuncs import artifact_processor, convert_utc_human_to_timezone, convert_ts_int_to_timezone, webkit_timestampsconv
2525

2626

2727
@artifact_processor
@@ -52,9 +52,13 @@ def get_biomeTextinputses(files_found, report_folder, seeker, wrap_text, timezon
5252
protostuff, types = blackboxprotobuf.decode_message(record.data, typess)
5353

5454
duration = protostuff['1']
55-
#Seems like the time is stored with an extra cocoa core offset added? we have to subtract it
56-
timestart = (webkit_timestampsconv(protostuff['2']-978307200))
57-
timestart = convert_utc_human_to_timezone(timestart, timezone_offset)
55+
# Records in "restricted" folder seem to have time in Unix time, whereas public was cocoa time
56+
if 'restricted' in file_found:
57+
timestart = (convert_ts_int_to_timezone(protostuff['2'], timezone_offset))
58+
else:
59+
timestart = (webkit_timestampsconv(protostuff['2']))
60+
timestart = convert_utc_human_to_timezone(timestart, timezone_offset)
61+
5862
bundleid = (protostuff.get('3',''))
5963

6064
data_list.append((ts, timestart, record.state.name, bundleid, duration, filename,

scripts/artifacts/chrome.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,6 +1463,7 @@ def chromeOfflinePages(files_found, report_folder, seeker, wrap_text, timezone_o
14631463
return all_data_headers, all_data, report_file
14641464

14651465

1466+
@artifact_processor
14661467
def chromeMediaHistorySessions(files_found, report_folder, seeker, wrap_text, timezone_offset):
14671468
# all_data will be a consolidated list of all browsers with an extra column to discriminate the browser
14681469
all_data = []

0 commit comments

Comments
 (0)