Javascript snippets for testing.