     test.equal(lastEvent, null)
 
     loc.href = 'http://www.google.com/#!changedagain'
-    queue.push () ->
-        test.equal(lastEvent, 'hashchange')
+    queue.push (event) ->
+        test.equal(event.newURL, 'http://www.google.com/#!changedagain')
         test.done()
 
 # TODO: test navigating by setting properties like pathname

        document :
            createEvent : () ->
                return {initEvent : () ->}
        dispatchEvent : () ->
            lastEvent = 'hashchange'
            (queue.pop())()

    load : () ->
        lastEvent = 'pagechange'


    MockBrowser.setLocation('http://www.google.com')
    loc = new Location('http://www.google.com/#!update')
    queue.push (event) ->
        test.equal(event.newURL, 'http://www.google.com/#!update')
        test.done()

exports['test hashchange'] = (test) ->
    
    # None of these tests should cause navigation, only hash changes.
    lastEvent = null
    MockBrowser.setLocation('http://www.google.com')
    loc = new Location('http://www.google.com')
    test.equal(lastEvent, null)

    loc.href = 'http://www.google.com/#!/more/stuff'
    queue.push (event) ->
        test.equal(event.newURL, 'http://www.google.com/#!/more/stuff')

    lastEvent = null
    MockBrowser.setLocation('http://www.google.com/#!/more/stuff')
