| Index: third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/joint-session-history/joint-session-history-only-fully-active.html
|
| diff --git a/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/joint-session-history/joint-session-history-only-fully-active.html b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/joint-session-history/joint-session-history-only-fully-active.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c42d160a21c4c61e2d12d21c49940a0265349735
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/imported/wpt/html/browsers/history/joint-session-history/joint-session-history-only-fully-active.html
|
| @@ -0,0 +1,30 @@
|
| +<!doctype html>
|
| +<meta charset="utf-8">
|
| +<title>Do only fully active documents count for session history?</title>
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<body>
|
| + <iframe id="child"></iframe>
|
| +</body>
|
| +<script>
|
| + async_test(function(t) {
|
| + var old_history_len = window.history.length;
|
| + var child = document.getElementById("child");
|
| + var timer = window.setInterval(t.step_func(poll), 100);
|
| + function poll() {
|
| + if (child.getAttribute("data-child-loaded")) {
|
| + // Check to see how many entries have been added to the session history.
|
| + // The spec https://html.spec.whatwg.org/multipage/#joint-session-history
|
| + // says that only fully active documents are included in the joint session history.
|
| + // If only fully active documents count, then the only fully active document
|
| + // is the child, with session length 1, so the joint session length change will be 1.
|
| + // If all documents count, then the grandchild is reachable via the session history,
|
| + // and it has session length 1, so the joint session length change will be 2.
|
| + assert_equals(2, window.history.length - old_history_len);
|
| + window.clearInterval(timer);
|
| + t.done();
|
| + }
|
| + }
|
| + child.src = "joint-session-history-child1.html";
|
| + });
|
| +</script>
|
|
|