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 <utility> | 5 #include <utility> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 // | 262 // |
263 // -open-> Page 11 -slow_redirect-> Page 12. | 263 // -open-> Page 11 -slow_redirect-> Page 12. |
264 // | 264 // |
265 // If redirect occurs after a user gesture, e.g., mouse click, the | 265 // If redirect occurs after a user gesture, e.g., mouse click, the |
266 // redirect is more likely to be user-initiated rather than automatic. | 266 // redirect is more likely to be user-initiated rather than automatic. |
267 // Therefore, Page 11 should be in the history in addition to Page 12. | 267 // Therefore, Page 11 should be in the history in addition to Page 12. |
268 LoadAndWaitForFile("history_length_test_page_11.html"); | 268 LoadAndWaitForFile("history_length_test_page_11.html"); |
269 | 269 |
270 content::SimulateMouseClick( | 270 content::SimulateMouseClick( |
271 browser()->tab_strip_model()->GetActiveWebContents(), 0, | 271 browser()->tab_strip_model()->GetActiveWebContents(), 0, |
272 blink::WebMouseEvent::ButtonLeft); | 272 blink::WebMouseEvent::Button::Left); |
273 LoadAndWaitForFile("history_length_test_page_11.html"); | 273 LoadAndWaitForFile("history_length_test_page_11.html"); |
274 } | 274 } |
275 | 275 |
276 // Disabled after fixing this test class. See http://crbug.com/511442 for | 276 // Disabled after fixing this test class. See http://crbug.com/511442 for |
277 // details. | 277 // details. |
278 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, | 278 IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, |
279 DISABLED_ConsiderSlowRedirectAsUserInitiated) { | 279 DISABLED_ConsiderSlowRedirectAsUserInitiated) { |
280 // Test the history length for the following page transition. | 280 // Test the history length for the following page transition. |
281 // | 281 // |
282 // -open-> Page 21 -redirect-> Page 22. | 282 // -open-> Page 21 -redirect-> Page 22. |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 | 542 |
543 content::WebContents* active_web_contents = | 543 content::WebContents* active_web_contents = |
544 browser()->tab_strip_model()->GetActiveWebContents(); | 544 browser()->tab_strip_model()->GetActiveWebContents(); |
545 ASSERT_EQ(web_contents, active_web_contents); | 545 ASSERT_EQ(web_contents, active_web_contents); |
546 ASSERT_EQ(history_url, active_web_contents->GetURL()); | 546 ASSERT_EQ(history_url, active_web_contents->GetURL()); |
547 | 547 |
548 content::WebContents* second_tab = | 548 content::WebContents* second_tab = |
549 browser()->tab_strip_model()->GetWebContentsAt(1); | 549 browser()->tab_strip_model()->GetWebContentsAt(1); |
550 ASSERT_NE(history_url, second_tab->GetURL()); | 550 ASSERT_NE(history_url, second_tab->GetURL()); |
551 } | 551 } |
OLD | NEW |