OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/site_per_process_browsertest.h" | 5 #include "content/browser/site_per_process_browsertest.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 6929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6940 TestNavigationObserver load_observer(shell()->web_contents()); | 6940 TestNavigationObserver load_observer(shell()->web_contents()); |
6941 EXPECT_TRUE(ExecuteScript(shell(), "frames[0].location.href = '" + | 6941 EXPECT_TRUE(ExecuteScript(shell(), "frames[0].location.href = '" + |
6942 blocked_urls[i].spec() + "';")); | 6942 blocked_urls[i].spec() + "';")); |
6943 load_observer.Wait(); | 6943 load_observer.Wait(); |
6944 | 6944 |
6945 // The blocked frame's origin should become unique. | 6945 // The blocked frame's origin should become unique. |
6946 EXPECT_EQ("null", root->child_at(0)->current_origin().Serialize()); | 6946 EXPECT_EQ("null", root->child_at(0)->current_origin().Serialize()); |
6947 | 6947 |
6948 // Ensure that we don't use the blocked URL as the blocked frame's last | 6948 // Ensure that we don't use the blocked URL as the blocked frame's last |
6949 // committed URL (see https://crbug.com/622385). | 6949 // committed URL (see https://crbug.com/622385). |
6950 EXPECT_NE(root->child_at(0)->current_frame_host()->GetLastCommittedURL(), | 6950 EXPECT_NE(root->child_at(0)->current_frame_host()->last_successful_url(), |
alexmos
2016/12/20 01:34:39
Is this change still necessary? Committing a blan
arthursonzogni
2016/12/20 10:29:43
You are right.
| |
6951 blocked_urls[i]); | 6951 blocked_urls[i]); |
6952 | 6952 |
6953 // The blocked frame should still fire a load event in its parent's process. | 6953 // The blocked frame should still fire a load event in its parent's process. |
6954 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 6954 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
6955 | 6955 |
6956 // Check that the current RenderFrameHost has stopped loading. | 6956 // Check that the current RenderFrameHost has stopped loading. |
6957 EXPECT_FALSE(root->child_at(0)->current_frame_host()->is_loading()); | 6957 EXPECT_FALSE(root->child_at(0)->current_frame_host()->is_loading()); |
6958 | 6958 |
6959 // The blocked navigation should behave like an empty 200 response. Make | 6959 // The blocked navigation should behave like an empty 200 response. Make |
6960 // sure that the frame's document.title is empty: this double-checks both | 6960 // sure that the frame's document.title is empty: this double-checks both |
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8973 rfh->OnSwappedOut(); | 8973 rfh->OnSwappedOut(); |
8974 | 8974 |
8975 // Wait for the new a.com navigation to finish. | 8975 // Wait for the new a.com navigation to finish. |
8976 back_observer.Wait(); | 8976 back_observer.Wait(); |
8977 | 8977 |
8978 // The RVH for a.com should've been reused, and it should be active. | 8978 // The RVH for a.com should've been reused, and it should be active. |
8979 EXPECT_TRUE(rvh->is_active()); | 8979 EXPECT_TRUE(rvh->is_active()); |
8980 } | 8980 } |
8981 | 8981 |
8982 } // namespace content | 8982 } // namespace content |
OLD | NEW |