| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/web_contents/web_contents_impl.h" | 10 #include "content/browser/web_contents/web_contents_impl.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 "window.domAutomationController.send(clickCrossSiteLink());", | 153 "window.domAutomationController.send(clickCrossSiteLink());", |
| 154 &success)); | 154 &success)); |
| 155 EXPECT_TRUE(success); | 155 EXPECT_TRUE(success); |
| 156 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); | 156 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); |
| 157 EXPECT_EQ(url, observer.last_navigation_url()); | 157 EXPECT_EQ(url, observer.last_navigation_url()); |
| 158 EXPECT_TRUE(observer.last_navigation_succeeded()); | 158 EXPECT_TRUE(observer.last_navigation_succeeded()); |
| 159 } | 159 } |
| 160 | 160 |
| 161 // The RenderFrameHost should not have changed unless site-per-process is | 161 // The RenderFrameHost should not have changed unless site-per-process is |
| 162 // enabled. | 162 // enabled. |
| 163 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) { | 163 if (AreAllSitesIsolatedForTesting()) { |
| 164 EXPECT_NE(initial_rfh, | 164 EXPECT_NE(initial_rfh, |
| 165 static_cast<WebContentsImpl*>(shell()->web_contents()) | 165 static_cast<WebContentsImpl*>(shell()->web_contents()) |
| 166 ->GetFrameTree() | 166 ->GetFrameTree() |
| 167 ->root() | 167 ->root() |
| 168 ->current_frame_host()); | 168 ->current_frame_host()); |
| 169 } else { | 169 } else { |
| 170 EXPECT_EQ(initial_rfh, | 170 EXPECT_EQ(initial_rfh, |
| 171 static_cast<WebContentsImpl*>(shell()->web_contents()) | 171 static_cast<WebContentsImpl*>(shell()->web_contents()) |
| 172 ->GetFrameTree() | 172 ->GetFrameTree() |
| 173 ->root() | 173 ->root() |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 base::UTF16ToASCII(shell()->web_contents()->GetTitle())); | 222 base::UTF16ToASCII(shell()->web_contents()->GetTitle())); |
| 223 EXPECT_EQ(post_url, shell()->web_contents()->GetLastCommittedURL()); | 223 EXPECT_EQ(post_url, shell()->web_contents()->GetLastCommittedURL()); |
| 224 EXPECT_TRUE(shell() | 224 EXPECT_TRUE(shell() |
| 225 ->web_contents() | 225 ->web_contents() |
| 226 ->GetController() | 226 ->GetController() |
| 227 .GetActiveEntry() | 227 .GetActiveEntry() |
| 228 ->GetHasPostData()); | 228 ->GetHasPostData()); |
| 229 } | 229 } |
| 230 | 230 |
| 231 } // namespace content | 231 } // namespace content |
| OLD | NEW |