Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 25654005: Remove GetActiveEntry usage from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment, added TODO, rebased on ToT. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/test/test_timeouts.h" 10 #include "base/test/test_timeouts.h"
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 515
516 EXPECT_NE(old_host, web_contents->GetRenderViewHost()) 516 EXPECT_NE(old_host, web_contents->GetRenderViewHost())
517 << navigations[i].url.spec(); 517 << navigations[i].url.spec();
518 EXPECT_EQ(old_host, screenshot_manager()->screenshot_taken_for()); 518 EXPECT_EQ(old_host, screenshot_manager()->screenshot_taken_for());
519 519
520 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry( 520 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
521 web_contents->GetController().GetEntryAtOffset(-1)); 521 web_contents->GetController().GetEntryAtOffset(-1));
522 EXPECT_TRUE(screenshot_manager()->ScreenshotSetForEntry(entry)); 522 EXPECT_TRUE(screenshot_manager()->ScreenshotSetForEntry(entry));
523 523
524 entry = NavigationEntryImpl::FromNavigationEntry( 524 entry = NavigationEntryImpl::FromNavigationEntry(
525 web_contents->GetController().GetActiveEntry()); 525 web_contents->GetController().GetLastCommittedEntry());
526 EXPECT_FALSE(screenshot_manager()->ScreenshotSetForEntry(entry)); 526 EXPECT_FALSE(screenshot_manager()->ScreenshotSetForEntry(entry));
527 EXPECT_FALSE(entry->screenshot().get()); 527 EXPECT_FALSE(entry->screenshot().get());
528 screenshot_manager()->Reset(); 528 screenshot_manager()->Reset();
529 } 529 }
530 530
531 // Increase the minimum interval between taking screenshots. 531 // Increase the minimum interval between taking screenshots.
532 set_min_screenshot_interval(60000); 532 set_min_screenshot_interval(60000);
533 533
534 // Navigate again. This should not take any screenshot because of the 534 // Navigate again. This should not take any screenshot because of the
535 // increased screenshot interval. 535 // increased screenshot interval.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 10); 649 10);
650 string16 actual_title = title_watcher.WaitAndGetTitle(); 650 string16 actual_title = title_watcher.WaitAndGetTitle();
651 EXPECT_EQ(expected_title, actual_title); 651 EXPECT_EQ(expected_title, actual_title);
652 652
653 EXPECT_EQ(2, GetCurrentIndex()); 653 EXPECT_EQ(2, GetCurrentIndex());
654 EXPECT_TRUE(controller.CanGoBack()); 654 EXPECT_TRUE(controller.CanGoBack());
655 EXPECT_FALSE(controller.CanGoForward()); 655 EXPECT_FALSE(controller.CanGoForward());
656 } 656 }
657 657
658 } // namespace content 658 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/public/browser/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698