OLD | NEW |
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 | 537 |
538 delete msg; | 538 delete msg; |
539 return true; | 539 return true; |
540 } | 540 } |
541 | 541 |
542 virtual void SetBackgrounded(bool backgrounded) { | 542 virtual void SetBackgrounded(bool backgrounded) { |
543 backgrounded_ = backgrounded; | 543 backgrounded_ = backgrounded; |
544 } | 544 } |
545 | 545 |
546 private: | 546 private: |
547 int add_relay_count_; | |
548 int reset_relay_count_; | |
549 | |
550 DISALLOW_COPY_AND_ASSIGN(VisitRelayingRenderProcessHost); | 547 DISALLOW_COPY_AND_ASSIGN(VisitRelayingRenderProcessHost); |
551 }; | 548 }; |
552 | 549 |
553 class VisitedLinkRenderProcessHostFactory | 550 class VisitedLinkRenderProcessHostFactory |
554 : public MockRenderProcessHostFactory { | 551 : public MockRenderProcessHostFactory { |
555 public: | 552 public: |
556 VisitedLinkRenderProcessHostFactory() | 553 VisitedLinkRenderProcessHostFactory() |
557 : MockRenderProcessHostFactory(), | 554 : MockRenderProcessHostFactory(), |
558 relay_mode_(false) {} | 555 relay_mode_(false) {} |
559 virtual RenderProcessHost* CreateRenderProcessHost(Profile* profile) const { | 556 virtual RenderProcessHost* CreateRenderProcessHost(Profile* profile) const { |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 EXPECT_EQ(0, profile()->add_event_count()); | 747 EXPECT_EQ(0, profile()->add_event_count()); |
751 EXPECT_EQ(0, profile()->reset_event_count()); | 748 EXPECT_EQ(0, profile()->reset_event_count()); |
752 | 749 |
753 rvh()->CreateRenderView(); | 750 rvh()->CreateRenderView(); |
754 | 751 |
755 // We should now have just a reset event: adds are eaten up by a reset | 752 // We should now have just a reset event: adds are eaten up by a reset |
756 // that followed. | 753 // that followed. |
757 EXPECT_EQ(0, profile()->add_event_count()); | 754 EXPECT_EQ(0, profile()->add_event_count()); |
758 EXPECT_EQ(1, profile()->reset_event_count()); | 755 EXPECT_EQ(1, profile()->reset_event_count()); |
759 } | 756 } |
OLD | NEW |