Fix warning about useless setTimeout call in Firefox

One call to delay was missing function() wrapping and
thus executing the function immediately. This also fixes
the missing delay for other browsers.

Bug: 46605
Change-Id: Ia8d25a768c889a1207025e017790c9efa66151eb
Merge "Fix warning about useless setTimeout call in Firefox"