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

Side by Side Diff: chrome/browser/visitedlink/visitedlink_unittest.cc

Issue 10696158: Rename WasRestored to WasShown across all uses. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Bring to ToT to commit Created 8 years, 4 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
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 <cstdio> 5 #include <cstdio>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 master->AddURL(GURL("http://google.com/")); 694 master->AddURL(GURL("http://google.com/"));
695 master->AddURL(GURL("http://chromium.org/")); 695 master->AddURL(GURL("http://chromium.org/"));
696 696
697 WaitForCoalescense(); 697 WaitForCoalescense();
698 698
699 // We shouldn't have any events. 699 // We shouldn't have any events.
700 EXPECT_EQ(0, profile()->add_event_count()); 700 EXPECT_EQ(0, profile()->add_event_count());
701 EXPECT_EQ(0, profile()->reset_event_count()); 701 EXPECT_EQ(0, profile()->reset_event_count());
702 702
703 // Simulate the tab becoming active. 703 // Simulate the tab becoming active.
704 rvh_tester()->SimulateWasRestored(); 704 rvh_tester()->SimulateWasShown();
705 705
706 // We should now have 3 add events, still no reset events. 706 // We should now have 3 add events, still no reset events.
707 EXPECT_EQ(1, profile()->add_event_count()); 707 EXPECT_EQ(1, profile()->add_event_count());
708 EXPECT_EQ(0, profile()->reset_event_count()); 708 EXPECT_EQ(0, profile()->reset_event_count());
709 709
710 // Deactivate the tab again. 710 // Deactivate the tab again.
711 rvh_tester()->SimulateWasHidden(); 711 rvh_tester()->SimulateWasHidden();
712 712
713 // Add a bunch of URLs (over 50) to exhaust the link event buffer. 713 // Add a bunch of URLs (over 50) to exhaust the link event buffer.
714 for (int i = 0; i < 100; i++) 714 for (int i = 0; i < 100; i++)
715 master->AddURL(TestURL(i)); 715 master->AddURL(TestURL(i));
716 716
717 WaitForCoalescense(); 717 WaitForCoalescense();
718 718
719 // Again, no change in events until tab is active. 719 // Again, no change in events until tab is active.
720 EXPECT_EQ(1, profile()->add_event_count()); 720 EXPECT_EQ(1, profile()->add_event_count());
721 EXPECT_EQ(0, profile()->reset_event_count()); 721 EXPECT_EQ(0, profile()->reset_event_count());
722 722
723 // Activate the tab. 723 // Activate the tab.
724 rvh_tester()->SimulateWasRestored(); 724 rvh_tester()->SimulateWasShown();
725 725
726 // We should have only one more reset event. 726 // We should have only one more reset event.
727 EXPECT_EQ(1, profile()->add_event_count()); 727 EXPECT_EQ(1, profile()->add_event_count());
728 EXPECT_EQ(1, profile()->reset_event_count()); 728 EXPECT_EQ(1, profile()->reset_event_count());
729 } 729 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/tabs/tab_strip_model_unittest.cc ('k') | content/browser/browser_plugin/old/browser_plugin_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698