go-to: |DOC_PATH| + "redirect/inner/old.html"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"})
// Check that it preserves fragments when redirecting.
go-to: |DOC_PATH| + "redirect/inner/old.html#fragment"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#fragment"})
// The fragment one here isn't necessary, but should still work.
go-to: |DOC_PATH| + "redirect/pointless-fragment.html"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"})
go-to: |DOC_PATH| + "redirect/pointless-fragment.html#foo"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#foo"})
// Page rename, and a fragment rename.
go-to: |DOC_PATH| + "redirect/rename-page-and-fragment.html"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"})
go-to: |DOC_PATH| + "redirect/rename-page-and-fragment.html#orig"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#new"})
// Page rename, and the fragment goes to a *different* page from the default.
go-to: |DOC_PATH| + "redirect/rename-page-fragment-elsewhere.html"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"})
go-to: |DOC_PATH| + "redirect/rename-page-fragment-elsewhere.html#orig"
assert-window-property: ({"location": |DOC_PATH| + "redirect/other-chapter.html#new"})
// Rename fragment on an existing page.
go-to: |DOC_PATH| + "redirect/new-chapter.html#orig"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#new"})
// Other fragments aren't affected.
go-to: |DOC_PATH| + "redirect/index.html" // Reset page since redirects are processed on load.
go-to: |DOC_PATH| + "redirect/new-chapter.html"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html"})
go-to: |DOC_PATH| + "redirect/index.html" // Reset page since redirects are processed on load.
go-to: |DOC_PATH| + "redirect/new-chapter.html#dont-change"
assert-window-property: ({"location": |DOC_PATH| + "redirect/new-chapter.html#dont-change"})
// Rename fragment on an existing page to another page.
go-to: |DOC_PATH| + "redirect/index.html" // Reset page since redirects are processed on load.
go-to: |DOC_PATH| + "redirect/new-chapter.html#orig-new-chapter"
assert-window-property: ({"location": |DOC_PATH| + "redirect/other-chapter.html#new"})