emberjs/ember.js — pull request #2551 by danii-nebot (2013-04-24 21:46:55+00:00)
Title: Safari 5 should update URL when using History based location (pushState)

Fixes #2365

`history.state` is [not supported in Safari 5](https://developer.mozilla.org/en/docs/DOM/Manipulating_the_browser_history) and the current implementation of `Ember.HistoryLocation` relies on it to check the current path before making a `pushState` or `replaceState`. This the reason why the URL is not updating in any Safari 5.

I fixed it by removing the references to `history.state` to get the current path and used `location.pathname` instead. I went ahead and removed the `HistoryLocation.getState` method as well since `history.state` can't be relied upon to store any data. I updated also the `HistoryTestLocation` to reflect these changes.

All tests are passing correctly (including of course the modified `HistoryTestLocation`) but I am not sure if I should make any additional tests for this fix. If so, I'd really appreciate some advice on how to build a test for this browser-specific issue.