{"ScriptPreparationCode":"/*your preparation JavaScript code goes here\r\nTo execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/\r\nasync function globalMeasureThatScriptPrepareFunction() {\r\n // This function is optional, feel free to remove it.\r\n // await someThing();\r\n}","TestCases":[{"Name":"actual","Code":"\t\tvar page_view_navigate, page_view_reload, page_view_back_forward;\r\n\t\tvar type = performance.getEntriesByType(\u0027navigation\u0027)[0].type;\r\n\t\tvar navigationType = function(type) {\r\n\t\t\tif (type === \u0027navigate\u0027) {\r\n\t\t\t\tpage_view_navigate = 1;\r\n\t\t\t\treturn \u00270\u0027;\r\n\t\t\t} else if (type === \u0027reload\u0027) {\r\n\t\t\t\tpage_view_reload = 1;\r\n\t\t\t\treturn \u00271\u0027;\r\n\t\t\t} else if (type === \u0027back_forward\u0027) {\r\n\t\t\t\tpage_view_back_forward = 1;\r\n\t\t\t\treturn \u00272\u0027;\r\n\t\t\t} else {\r\n\t\t\t\treturn \u0027255\u0027;\r\n\t\t\t}\r\n\t\t};\r\n\t\tvar page_reload = navigationType(type);","IsDeferred":false},{"Name":"future","Code":"\tvar getNavigationType = function () {\r\n\t\tvar type = performance.getEntriesByType(\u0027navigation\u0027)[0].type;\r\n\t\tswitch (type) {\r\n\t\t\tcase \u0027navigate\u0027:\r\n\t\t\t\treturn { pageViewNavigate: 1, value: \u00270\u0027 };\r\n\t\t\tcase \u0027reload\u0027:\r\n\t\t\t\treturn { pageViewReload: 1, value: \u00271\u0027 };\r\n\t\t\tcase \u0027back_forward\u0027:\r\n\t\t\t\treturn { pageViewBackForward: 1, value: \u00272\u0027 };\r\n\t\t\tdefault:\r\n\t\t\t\treturn { value: \u0027255\u0027 };\r\n\t\t}\r\n\t};\r\n\r\n\tvar navigationInfo = getNavigationType();\r\n\tvar page_view_navigate = navigationInfo.pageViewNavigate;\r\n\tvar page_view_reload = navigationInfo.pageViewReload;\r\n\tvar page_view_back_forward = navigationInfo.pageViewBackForward;\r\n\tvar page_reload = navigationInfo.value;","IsDeferred":false},{"Name":"direct","Code":"var page_view_navigate, page_view_reload, page_view_back_forward;\r\nvar navigationType = function() {\r\n try {\r\n var type = performance.getEntriesByType(\u0027navigation\u0027)[0].type;\r\n \r\n if (type === \u0027navigate\u0027) {\r\n page_view_navigate = 1;\r\n return \u00270\u0027;\r\n } else if (type === \u0027reload\u0027) {\r\n page_view_reload = 1;\r\n return \u00271\u0027;\r\n } else if (type === \u0027back_forward\u0027) {\r\n page_view_back_forward = 1;\r\n return \u00272\u0027;\r\n } else {\r\n return \u0027255\u0027;\r\n }\r\n } catch (error) {\r\n return \u0027255\u0027;\r\n }\r\n};\r\nvar page_reload = navigationType();","IsDeferred":false}]}