Its working fine for me.
Here's my view/HTML file
<html>
<head>
<link href="mystyle.css" rel="stylesheet" type="text/css"/>
<meta name="Park Map Brisbane" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Info windows</title>
<style>
#map-canvas {
height: 800px;
width: 800px;
text-align: center;
margin-left: 51px;
margin: 0px;
padding: 0px
}
.gm-style-iw{
height: 100% !important;
overflow: hidden !important;
</style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script src="/assets/scripts/test.js"></script>
</head>
<body>
<div id="map-canvas"></div>
</body>
<html>
The script part is put inside an external file called test.js
To access my javascript file I need the filepath '/assets/scripts'. Please enter your filepath where your script is located. For example, it will be just test.js if its in the same folder level.