Opened 16 years ago
Closed 13 years ago
#16339 closed task (blessed) (invalid)
pushState Test Case
| Reported by: | mdawaffe | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
This isn't a useful bit of code, just a test case to ground future pushState work for 3.2. Or be ignored by future pushState work for 3.2 :)
Attached is a test case for determining browser behavior when using pushState.
The numbered links use AJAX and pushState. The "Other" link is a real (non-AJAX) link to an external site.
If the state of the page is refreshed via AJAX, you'll see a var_dump( $_POST ). If the state of the page is refreshed by a page refresh, you won't.
An example of something this test says is broken in Safari 5.0.3 (6533.19.4):
- Load the page (state = 0: pageload)
- click "One" (state = 1: ajax)
- click "Two" (state = 2: ajax)
- click "Three" (state = 3: ajax)
- click "Other" (state = external site: pageload)
- go Back in browser history (state = 3: ajax or just history?)
- go Back (state = 2: ajax or just history?)
- go Back (state = 1: ajax or just history?)
- go Back (state = 0: ajax). Everything is fine up to this point, though it's odd we do an AJAX request to get here.
- refresh the page once, either by CTRL-R or by hitting enter in the URL bar (state = 3: ajax). That's wrong. What happened? Why are we here?
- refresh the page a second time (state = 0: pageload). As expected.
An example of something the test says is broken in Chrome10.0.642.2 dev:
- Do pretty much anything. Chrome Dev fires a popState event on the first page load.
It could be a badly written test, or a badly written implementation of push/popState handling, or both. These are the kinds of scenarios we'll need to test, though.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
That is expected behavior. The HTML5 (or just HTML, now) spec changed in August to make this clear: http://html5.org/tools/web-apps-tracker?from=5345&to=5346
Safari is probably the misbehaving one here.
History. This was the last state of the document before we jumped over to example.com
Ajax
Ajax
10 just sounds like a Safari bug.