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

Side by Side Diff: components/visitedlink/test/visitedlink_unittest.cc

Issue 13973004: Convert string16 -> base::string16 in components/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 <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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 679
680 WaitForCoalescense(); 680 WaitForCoalescense();
681 681
682 // We should have no change in results except for one new reset event. 682 // We should have no change in results except for one new reset event.
683 EXPECT_EQ(6, context()->add_count()); 683 EXPECT_EQ(6, context()->add_count());
684 EXPECT_EQ(2, context()->add_event_count()); 684 EXPECT_EQ(2, context()->add_event_count());
685 EXPECT_EQ(1, context()->reset_event_count()); 685 EXPECT_EQ(1, context()->reset_event_count());
686 } 686 }
687 687
688 TEST_F(VisitedLinkEventsTest, Basics) { 688 TEST_F(VisitedLinkEventsTest, Basics) {
689 RenderViewHostTester::For(rvh())->CreateRenderView(string16(), 689 RenderViewHostTester::For(rvh())->CreateRenderView(base::string16(),
690 MSG_ROUTING_NONE, 690 MSG_ROUTING_NONE,
691 -1); 691 -1);
692 692
693 // Add a few URLs. 693 // Add a few URLs.
694 master()->AddURL(GURL("http://acidtests.org/")); 694 master()->AddURL(GURL("http://acidtests.org/"));
695 master()->AddURL(GURL("http://google.com/")); 695 master()->AddURL(GURL("http://google.com/"));
696 master()->AddURL(GURL("http://chromium.org/")); 696 master()->AddURL(GURL("http://chromium.org/"));
697 697
698 WaitForCoalescense(); 698 WaitForCoalescense();
699 699
700 // We now should have 1 add event. 700 // We now should have 1 add event.
701 EXPECT_EQ(1, context()->add_event_count()); 701 EXPECT_EQ(1, context()->add_event_count());
702 EXPECT_EQ(0, context()->reset_event_count()); 702 EXPECT_EQ(0, context()->reset_event_count());
703 703
704 master()->DeleteAllURLs(); 704 master()->DeleteAllURLs();
705 705
706 WaitForCoalescense(); 706 WaitForCoalescense();
707 707
708 // We should have no change in add results, plus one new reset event. 708 // We should have no change in add results, plus one new reset event.
709 EXPECT_EQ(1, context()->add_event_count()); 709 EXPECT_EQ(1, context()->add_event_count());
710 EXPECT_EQ(1, context()->reset_event_count()); 710 EXPECT_EQ(1, context()->reset_event_count());
711 } 711 }
712 712
713 TEST_F(VisitedLinkEventsTest, TabVisibility) { 713 TEST_F(VisitedLinkEventsTest, TabVisibility) {
714 RenderViewHostTester::For(rvh())->CreateRenderView(string16(), 714 RenderViewHostTester::For(rvh())->CreateRenderView(base::string16(),
715 MSG_ROUTING_NONE, 715 MSG_ROUTING_NONE,
716 -1); 716 -1);
717 717
718 // Simulate tab becoming inactive. 718 // Simulate tab becoming inactive.
719 RenderViewHostTester::For(rvh())->SimulateWasHidden(); 719 RenderViewHostTester::For(rvh())->SimulateWasHidden();
720 720
721 // Add a few URLs. 721 // Add a few URLs.
722 master()->AddURL(GURL("http://acidtests.org/")); 722 master()->AddURL(GURL("http://acidtests.org/"));
723 master()->AddURL(GURL("http://google.com/")); 723 master()->AddURL(GURL("http://google.com/"));
724 master()->AddURL(GURL("http://chromium.org/")); 724 master()->AddURL(GURL("http://chromium.org/"));
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 content::NOTIFICATION_RENDERER_PROCESS_CREATED, 767 content::NOTIFICATION_RENDERER_PROCESS_CREATED,
768 content::Source<content::RenderProcessHost>(&different_process_host), 768 content::Source<content::RenderProcessHost>(&different_process_host),
769 content::NotificationService::NoDetails()); 769 content::NotificationService::NoDetails());
770 WaitForCoalescense(); 770 WaitForCoalescense();
771 771
772 EXPECT_EQ(0, different_context.new_table_count()); 772 EXPECT_EQ(0, different_context.new_table_count());
773 773
774 } 774 }
775 775
776 } // namespace components 776 } // namespace components
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698