| 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/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 // Tests that screenshot is taken correctly when navigation causes a | 393 // Tests that screenshot is taken correctly when navigation causes a |
| 394 // RenderViewHost to be swapped out. | 394 // RenderViewHost to be swapped out. |
| 395 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, | 395 IN_PROC_BROWSER_TEST_F(WebContentsViewAuraTest, |
| 396 ScreenshotForSwappedOutRenderViews) { | 396 ScreenshotForSwappedOutRenderViews) { |
| 397 ASSERT_NO_FATAL_FAILURE( | 397 ASSERT_NO_FATAL_FAILURE( |
| 398 StartTestWithPage("files/overscroll_navigation.html")); | 398 StartTestWithPage("files/overscroll_navigation.html")); |
| 399 // Create a new server with a different site. | 399 // Create a new server with a different site. |
| 400 net::TestServer https_server( | 400 net::TestServer https_server( |
| 401 net::TestServer::TYPE_HTTPS, | 401 net::TestServer::TYPE_HTTPS, |
| 402 net::TestServer::kLocalhost, | 402 net::TestServer::kLocalhost, |
| 403 FilePath(FILE_PATH_LITERAL("content/test/data"))); | 403 base::FilePath(FILE_PATH_LITERAL("content/test/data"))); |
| 404 ASSERT_TRUE(https_server.Start()); | 404 ASSERT_TRUE(https_server.Start()); |
| 405 | 405 |
| 406 WebContentsImpl* web_contents = | 406 WebContentsImpl* web_contents = |
| 407 static_cast<WebContentsImpl*>(shell()->web_contents()); | 407 static_cast<WebContentsImpl*>(shell()->web_contents()); |
| 408 | 408 |
| 409 struct { | 409 struct { |
| 410 GURL url; | 410 GURL url; |
| 411 int transition; | 411 int transition; |
| 412 } navigations[] = { | 412 } navigations[] = { |
| 413 { https_server.GetURL("files/title1.html"), | 413 { https_server.GetURL("files/title1.html"), |
| (...skipping 24 matching lines...) Expand all Loading... |
| 438 web_contents->GetController().GetEntryAtOffset(-1)); | 438 web_contents->GetController().GetEntryAtOffset(-1)); |
| 439 EXPECT_TRUE(entry->screenshot().get()); | 439 EXPECT_TRUE(entry->screenshot().get()); |
| 440 | 440 |
| 441 entry = NavigationEntryImpl::FromNavigationEntry( | 441 entry = NavigationEntryImpl::FromNavigationEntry( |
| 442 web_contents->GetController().GetActiveEntry()); | 442 web_contents->GetController().GetActiveEntry()); |
| 443 EXPECT_FALSE(entry->screenshot().get()); | 443 EXPECT_FALSE(entry->screenshot().get()); |
| 444 } | 444 } |
| 445 } | 445 } |
| 446 | 446 |
| 447 } // namespace content | 447 } // namespace content |
| OLD | NEW |