This patch fixes puppeteer navigation primitives to work with
same-document navigation.
Same-document navigation happens when document's URL is changed,
but document instance is not re-created. Some common scenarios
for same-document navigation are:
- History API
- anchor navigation
With this patch:
- pptr starts dispatching `framenavigated` event when frame's URL gets
changed due to same-document navigation
- `page.waitForNavigation` now works with same-document navigation
- `page.goBack()` and `page.goForward()` are handled correctly.
Fixes#257.
Today, we have tests split into multiple files, with files pulling
tests from some other files.
This patch starts explicitly gathering all tests from the same
`test.js` file.
Drive-By: move one test from `browser.spec.js` into `puppeteer.spec.js`
since it starts browser itself.