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

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

Issue 23022006: Remove GetActiveEntry usage from content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing android compile break. Created 7 years, 3 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 512
513 EXPECT_NE(old_host, web_contents->GetRenderViewHost()) 513 EXPECT_NE(old_host, web_contents->GetRenderViewHost())
514 << navigations[i].url.spec(); 514 << navigations[i].url.spec();
515 EXPECT_EQ(old_host, screenshot_manager()->screenshot_taken_for()); 515 EXPECT_EQ(old_host, screenshot_manager()->screenshot_taken_for());
516 516
517 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry( 517 NavigationEntryImpl* entry = NavigationEntryImpl::FromNavigationEntry(
518 web_contents->GetController().GetEntryAtOffset(-1)); 518 web_contents->GetController().GetEntryAtOffset(-1));
519 EXPECT_TRUE(screenshot_manager()->ScreenshotSetForEntry(entry)); 519 EXPECT_TRUE(screenshot_manager()->ScreenshotSetForEntry(entry));
520 520
521 entry = NavigationEntryImpl::FromNavigationEntry( 521 entry = NavigationEntryImpl::FromNavigationEntry(
522 web_contents->GetController().GetActiveEntry()); 522 web_contents->GetController().GetLastCommittedEntry());
523 EXPECT_FALSE(screenshot_manager()->ScreenshotSetForEntry(entry)); 523 EXPECT_FALSE(screenshot_manager()->ScreenshotSetForEntry(entry));
524 EXPECT_FALSE(entry->screenshot().get()); 524 EXPECT_FALSE(entry->screenshot().get());
525 screenshot_manager()->Reset(); 525 screenshot_manager()->Reset();
526 } 526 }
527 527
528 // Increase the minimum interval between taking screenshots. 528 // Increase the minimum interval between taking screenshots.
529 set_min_screenshot_interval(60000); 529 set_min_screenshot_interval(60000);
530 530
531 // Navigate again. This should not take any screenshot because of the 531 // Navigate again. This should not take any screenshot because of the
532 // increased screenshot interval. 532 // increased screenshot interval.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 10); 646 10);
647 string16 actual_title = title_watcher.WaitAndGetTitle(); 647 string16 actual_title = title_watcher.WaitAndGetTitle();
648 EXPECT_EQ(expected_title, actual_title); 648 EXPECT_EQ(expected_title, actual_title);
649 649
650 EXPECT_EQ(2, GetCurrentIndex()); 650 EXPECT_EQ(2, GetCurrentIndex());
651 EXPECT_TRUE(controller.CanGoBack()); 651 EXPECT_TRUE(controller.CanGoBack());
652 EXPECT_FALSE(controller.CanGoForward()); 652 EXPECT_FALSE(controller.CanGoForward());
653 } 653 }
654 654
655 } // namespace content 655 } // 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