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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "content/browser/web_contents/web_contents_impl.h" | 8 #include "content/browser/web_contents/web_contents_impl.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 EXPECT_TRUE(ExecuteScriptAndExtractBool( | 147 EXPECT_TRUE(ExecuteScriptAndExtractBool( |
148 shell()->web_contents(), | 148 shell()->web_contents(), |
149 "window.domAutomationController.send(clickCrossSiteLink());", | 149 "window.domAutomationController.send(clickCrossSiteLink());", |
150 &success)); | 150 &success)); |
151 EXPECT_TRUE(success); | 151 EXPECT_TRUE(success); |
152 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); | 152 EXPECT_TRUE(WaitForLoadStop(shell()->web_contents())); |
153 EXPECT_EQ(url, observer.last_navigation_url()); | 153 EXPECT_EQ(url, observer.last_navigation_url()); |
154 EXPECT_TRUE(observer.last_navigation_succeeded()); | 154 EXPECT_TRUE(observer.last_navigation_succeeded()); |
155 } | 155 } |
156 | 156 |
157 // The RenderFrameHost should have changed. | 157 // The RenderFrameHost should not have changed. |
158 EXPECT_NE(initial_rfh, static_cast<WebContentsImpl*>(shell()->web_contents()) | 158 EXPECT_EQ(initial_rfh, static_cast<WebContentsImpl*>(shell()->web_contents()) |
159 ->GetFrameTree()->root()->current_frame_host()); | 159 ->GetFrameTree()->root()->current_frame_host()); |
160 } | 160 } |
161 | 161 |
162 } // namespace content | 162 } // namespace content |
OLD | NEW |