| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/process_util.h" | 12 #include "base/process_util.h" |
| 13 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "chrome/browser/browser_thread.h" | 15 #include "chrome/browser/browser_thread.h" |
| 16 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
| 16 #include "chrome/browser/visitedlink/visitedlink_master.h" | 17 #include "chrome/browser/visitedlink/visitedlink_master.h" |
| 17 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" | 18 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" |
| 18 #include "chrome/browser/renderer_host/browser_render_process_host.h" | |
| 19 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | |
| 20 #include "chrome/common/render_messages.h" | 19 #include "chrome/common/render_messages.h" |
| 21 #include "chrome/renderer/visitedlink_slave.h" | 20 #include "chrome/renderer/visitedlink_slave.h" |
| 22 #include "chrome/test/testing_profile.h" | 21 #include "chrome/test/testing_profile.h" |
| 22 #include "content/browser/renderer_host/test_render_view_host.h" |
| 23 #include "googleurl/src/gurl.h" | 23 #include "googleurl/src/gurl.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 24 #include "testing/gtest/include/gtest/gtest.h" |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 // a nice long URL that we can append numbers to to get new URLs | 28 // a nice long URL that we can append numbers to to get new URLs |
| 29 const char g_test_prefix[] = | 29 const char g_test_prefix[] = |
| 30 "http://www.google.com/products/foo/index.html?id=45028640526508376&seq="; | 30 "http://www.google.com/products/foo/index.html?id=45028640526508376&seq="; |
| 31 const int g_test_count = 1000; | 31 const int g_test_count = 1000; |
| 32 | 32 |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 EXPECT_EQ(0, profile()->add_event_count()); | 766 EXPECT_EQ(0, profile()->add_event_count()); |
| 767 EXPECT_EQ(0, profile()->reset_event_count()); | 767 EXPECT_EQ(0, profile()->reset_event_count()); |
| 768 | 768 |
| 769 rvh()->CreateRenderView(string16()); | 769 rvh()->CreateRenderView(string16()); |
| 770 | 770 |
| 771 // We should now have just a reset event: adds are eaten up by a reset | 771 // We should now have just a reset event: adds are eaten up by a reset |
| 772 // that followed. | 772 // that followed. |
| 773 EXPECT_EQ(0, profile()->add_event_count()); | 773 EXPECT_EQ(0, profile()->add_event_count()); |
| 774 EXPECT_EQ(1, profile()->reset_event_count()); | 774 EXPECT_EQ(1, profile()->reset_event_count()); |
| 775 } | 775 } |
| OLD | NEW |