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 6869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6880 TestNavigationObserver load_observer(shell()->web_contents()); | 6880 TestNavigationObserver load_observer(shell()->web_contents()); |
6881 EXPECT_TRUE(ExecuteScript(shell(), "frames[0].location.href = '" + | 6881 EXPECT_TRUE(ExecuteScript(shell(), "frames[0].location.href = '" + |
6882 blocked_urls[i].spec() + "';")); | 6882 blocked_urls[i].spec() + "';")); |
6883 load_observer.Wait(); | 6883 load_observer.Wait(); |
6884 | 6884 |
6885 // The blocked frame's origin should become unique. | 6885 // The blocked frame's origin should become unique. |
6886 EXPECT_EQ("null", root->child_at(0)->current_origin().Serialize()); | 6886 EXPECT_EQ("null", root->child_at(0)->current_origin().Serialize()); |
6887 | 6887 |
6888 // Ensure that we don't use the blocked URL as the blocked frame's last | 6888 // Ensure that we don't use the blocked URL as the blocked frame's last |
6889 // committed URL (see https://crbug.com/622385). | 6889 // committed URL (see https://crbug.com/622385). |
6890 EXPECT_NE(root->child_at(0)->current_frame_host()->GetLastCommittedURL(), | 6890 EXPECT_NE(root->child_at(0)->current_frame_host()->last_successful_url(), |
6891 blocked_urls[i]); | 6891 blocked_urls[i]); |
6892 | 6892 |
6893 // The blocked frame should still fire a load event in its parent's process. | 6893 // The blocked frame should still fire a load event in its parent's process. |
6894 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); | 6894 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); |
6895 | 6895 |
6896 // Check that the current RenderFrameHost has stopped loading. | 6896 // Check that the current RenderFrameHost has stopped loading. |
6897 EXPECT_FALSE(root->child_at(0)->current_frame_host()->is_loading()); | 6897 EXPECT_FALSE(root->child_at(0)->current_frame_host()->is_loading()); |
6898 | 6898 |
6899 // The blocked navigation should behave like an empty 200 response. Make | 6899 // The blocked navigation should behave like an empty 200 response. Make |
6900 // sure that the frame's document.title is empty: this double-checks both | 6900 // sure that the frame's document.title is empty: this double-checks both |
(...skipping 1751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8652 // hit the 20 seconds delay before https://crbug.com/657195 was fixed. | 8652 // hit the 20 seconds delay before https://crbug.com/657195 was fixed. |
8653 EXPECT_TRUE(NavigateToURL(shell(), page_url)); | 8653 EXPECT_TRUE(NavigateToURL(shell(), page_url)); |
8654 EXPECT_EQ(page_url, shell()->web_contents()->GetLastCommittedURL()); | 8654 EXPECT_EQ(page_url, shell()->web_contents()->GetLastCommittedURL()); |
8655 | 8655 |
8656 // Note: even if the test fails and for some reason, the test has not timed | 8656 // Note: even if the test fails and for some reason, the test has not timed |
8657 // out by this point, the test teardown code will still hit a DCHECK when it | 8657 // out by this point, the test teardown code will still hit a DCHECK when it |
8658 // calls AssertNoURLRequests() in the shell's URLRequestContext destructor. | 8658 // calls AssertNoURLRequests() in the shell's URLRequestContext destructor. |
8659 } | 8659 } |
8660 | 8660 |
8661 } // namespace content | 8661 } // namespace content |
OLD | NEW |