| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/string16.h" | 5 #include "base/string16.h" |
| 6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/tab_contents/test_tab_contents.h" | |
| 9 #include "chrome/browser/ui/find_bar/find_bar_state.h" | 8 #include "chrome/browser/ui/find_bar/find_bar_state.h" |
| 10 #include "chrome/browser/ui/find_bar/find_tab_helper.h" | 9 #include "chrome/browser/ui/find_bar/find_tab_helper.h" |
| 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 12 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" | 11 #include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h" |
| 13 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 14 #include "chrome/test/testing_profile.h" | 13 #include "chrome/test/testing_profile.h" |
| 14 #include "content/browser/tab_contents/test_tab_contents.h" |
| 15 | 15 |
| 16 typedef TabContentsWrapperTestHarness FindBackendTest; | 16 typedef TabContentsWrapperTestHarness FindBackendTest; |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 string16 FindPrepopulateText(TabContents* contents) { | 20 string16 FindPrepopulateText(TabContents* contents) { |
| 21 return FindBarState::GetLastPrepopulateText(contents->profile()); | 21 return FindBarState::GetLastPrepopulateText(contents->profile()); |
| 22 } | 22 } |
| 23 | 23 |
| 24 } // end namespace | 24 } // end namespace |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // find_tab_helper (as indicated by the last two params). | 72 // find_tab_helper (as indicated by the last two params). |
| 73 find_tab_helper->StartFinding(search_term3, true, false); | 73 find_tab_helper->StartFinding(search_term3, true, false); |
| 74 | 74 |
| 75 // Once more, pre-populate string should always match between the two, but | 75 // Once more, pre-populate string should always match between the two, but |
| 76 // find_text should not. | 76 // find_text should not. |
| 77 EXPECT_EQ(search_term3, FindPrepopulateText(contents())); | 77 EXPECT_EQ(search_term3, FindPrepopulateText(contents())); |
| 78 EXPECT_EQ(search_term3, find_tab_helper->find_text()); | 78 EXPECT_EQ(search_term3, find_tab_helper->find_text()); |
| 79 EXPECT_EQ(search_term3, FindPrepopulateText(contents2)); | 79 EXPECT_EQ(search_term3, FindPrepopulateText(contents2)); |
| 80 EXPECT_EQ(search_term2, find_tab_helper2->find_text()); | 80 EXPECT_EQ(search_term2, find_tab_helper2->find_text()); |
| 81 } | 81 } |
| OLD | NEW |