| 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 "chrome/browser/find_bar_state.h" | 8 #include "chrome/browser/find_bar_state.h" |
| 8 #include "chrome/browser/renderer_host/test/test_render_view_host.h" | 9 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 9 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
| 10 | 11 |
| 11 typedef RenderViewHostTestHarness FindBackendTest; | 12 typedef RenderViewHostTestHarness FindBackendTest; |
| 12 | 13 |
| 13 namespace { | 14 namespace { |
| 14 | 15 |
| 15 string16 FindPrepopulateText(TabContents* contents) { | 16 string16 FindPrepopulateText(TabContents* contents) { |
| 16 return FindBarState::GetLastPrepopulateText(contents->profile()); | 17 return FindBarState::GetLastPrepopulateText(contents->profile()); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // sensitive (as indicated by the last two params). | 65 // sensitive (as indicated by the last two params). |
| 65 contents()->StartFinding(search_term3, true, false); | 66 contents()->StartFinding(search_term3, true, false); |
| 66 | 67 |
| 67 // Once more, pre-populate string should always match between the two, but | 68 // Once more, pre-populate string should always match between the two, but |
| 68 // find_text should not. | 69 // find_text should not. |
| 69 EXPECT_EQ(search_term3, FindPrepopulateText(contents())); | 70 EXPECT_EQ(search_term3, FindPrepopulateText(contents())); |
| 70 EXPECT_EQ(search_term3, contents()->find_text()); | 71 EXPECT_EQ(search_term3, contents()->find_text()); |
| 71 EXPECT_EQ(search_term3, FindPrepopulateText(&contents2)); | 72 EXPECT_EQ(search_term3, FindPrepopulateText(&contents2)); |
| 72 EXPECT_EQ(search_term2, contents2.find_text()); | 73 EXPECT_EQ(search_term2, contents2.find_text()); |
| 73 } | 74 } |
| OLD | NEW |