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

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

Issue 164071: Merge 22540 - Ensure that we never call into WebCore::Page static methods whe... (Closed) Base URL: svn://chrome-svn/chrome/branches/197/src/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/renderer_host/test/test_render_view_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /trunk/src/chrome/browser/visitedlink_unittest.cc:r22540
Merged /branches/chrome_webkit_merge_branch/chrome/browser/visitedlink_unittest.cc:r69-2775
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <vector> 5 #include <vector>
6 #include <string> 6 #include <string>
7 #include <cstdio> 7 #include <cstdio>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 class VisitedLinkEventsTest : public RenderViewHostTestHarness { 558 class VisitedLinkEventsTest : public RenderViewHostTestHarness {
559 public: 559 public:
560 VisitedLinkEventsTest() : RenderViewHostTestHarness() {} 560 VisitedLinkEventsTest() : RenderViewHostTestHarness() {}
561 virtual void SetFactoryMode() {} 561 virtual void SetFactoryMode() {}
562 virtual void SetUp() { 562 virtual void SetUp() {
563 SetFactoryMode(); 563 SetFactoryMode();
564 event_listener_.reset(new VisitedLinkEventListener()); 564 event_listener_.reset(new VisitedLinkEventListener());
565 rvh_factory_.set_render_process_host_factory(&vc_rph_factory_); 565 rvh_factory_.set_render_process_host_factory(&vc_rph_factory_);
566 profile_.reset(new VisitCountingProfile(event_listener_.get())); 566 profile_.reset(new VisitCountingProfile(event_listener_.get()));
567 RenderViewHostTestHarness::SetUp(); 567 RenderViewHostTestHarness::SetUp();
568 rvh()->CreateRenderView();
568 } 569 }
569 570
570 VisitCountingProfile* profile() const { 571 VisitCountingProfile* profile() const {
571 return static_cast<VisitCountingProfile*>(profile_.get()); 572 return static_cast<VisitCountingProfile*>(profile_.get());
572 } 573 }
573 574
574 void WaitForCoalescense() { 575 void WaitForCoalescense() {
575 // Let the timer fire. 576 // Let the timer fire.
576 MessageLoop::current()->PostDelayedTask(FROM_HERE, 577 MessageLoop::current()->PostDelayedTask(FROM_HERE,
577 new MessageLoop::QuitTask(), 110); 578 new MessageLoop::QuitTask(), 110);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 EXPECT_EQ(1, profile()->add_event_count()); 705 EXPECT_EQ(1, profile()->add_event_count());
705 EXPECT_EQ(0, profile()->reset_event_count()); 706 EXPECT_EQ(0, profile()->reset_event_count());
706 707
707 // Activate the tab. 708 // Activate the tab.
708 rvh()->WasRestored(); 709 rvh()->WasRestored();
709 710
710 // We should have only one more reset event. 711 // We should have only one more reset event.
711 EXPECT_EQ(1, profile()->add_event_count()); 712 EXPECT_EQ(1, profile()->add_event_count());
712 EXPECT_EQ(1, profile()->reset_event_count()); 713 EXPECT_EQ(1, profile()->reset_event_count());
713 } 714 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/test/test_render_view_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698