Commit 1d075900 authored by avi's avatar avi Committed by Commit bot

Add tests for navigation type classifications.

BUG=369661
TEST=no code changes; this adds new tests

Review URL: https://codereview.chromium.org/987923002

Cr-Commit-Position: refs/heads/master@{#319894}
parent 588c2d98
...@@ -13,11 +13,15 @@ enum NavigationType { ...@@ -13,11 +13,15 @@ enum NavigationType {
// Unknown type. // Unknown type.
NAVIGATION_TYPE_UNKNOWN, NAVIGATION_TYPE_UNKNOWN,
// A new page was navigated in the main frame. // A new page was navigated to in the main frame. This covers all cases where
// the main frame navigated and a new navigation entry was created. This means
// cases like navigations to a hash on the same page are NEW_PAGE, not
// IN_PAGE. (Navigation entries created by subframe navigations are
// NEW_SUBFRAME.)
NAVIGATION_TYPE_NEW_PAGE, NAVIGATION_TYPE_NEW_PAGE,
// Renavigating to an existing navigation entry. The entry is guaranteed to // Renavigating to an existing navigation entry. This is the case for history
// exist in the list, or else it would be a new page or IGNORE navigation. // navigation, reloads, and location.replace().
NAVIGATION_TYPE_EXISTING_PAGE, NAVIGATION_TYPE_EXISTING_PAGE,
// The same page has been reloaded as a result of the user requesting // The same page has been reloaded as a result of the user requesting
...@@ -26,10 +30,10 @@ enum NavigationType { ...@@ -26,10 +30,10 @@ enum NavigationType {
// pending entry for the load, which is then meaningless. // pending entry for the load, which is then meaningless.
NAVIGATION_TYPE_SAME_PAGE, NAVIGATION_TYPE_SAME_PAGE,
// In page navigations are when the reference fragment changes. This will // The navigation was in the main frame, to a different navigation entry, but
// be in the main frame only (we won't even get notified of in-page // appearing to the user to be a navigation within the same page. This is the
// subframe navigations). It may be for any page, not necessarily the last // case for history.replaceState(), as well as back and forward across
// committed one (for example, whey going back to a page with a ref). // fragment entries and history.pushState() entries.
NAVIGATION_TYPE_IN_PAGE, NAVIGATION_TYPE_IN_PAGE,
// A new subframe was manually navigated by the user. We will create a new // A new subframe was manually navigated by the user. We will create a new
......
<html>
<head>
</head>
<body>
<p>A page with a <a id="thelink" href="simple_page_1.html">link</a> to another page.
<p id="frag">And a <a id="fraglink" href="#frag">fragment link</a>.
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment