| 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 "chrome/browser/renderer_host/test_render_view_host.h" | 5 #include "chrome/browser/renderer_host/test/test_render_view_host.h" |
| 6 #include "chrome/common/url_constants.h" | 6 #include "chrome/common/url_constants.h" |
| 7 | 7 |
| 8 typedef RenderViewHostTestHarness FindBackendTest; | 8 typedef RenderViewHostTestHarness FindBackendTest; |
| 9 | 9 |
| 10 // This test takes two TabContents objects, searches in both of them and | 10 // This test takes two TabContents objects, searches in both of them and |
| 11 // tests the internal state for find_text and find_prepopulate_text. | 11 // tests the internal state for find_text and find_prepopulate_text. |
| 12 TEST_F(FindBackendTest, InternalState) { | 12 TEST_F(FindBackendTest, InternalState) { |
| 13 // Initial state for the TabContents is blank strings. | 13 // Initial state for the TabContents is blank strings. |
| 14 EXPECT_EQ(string16(), contents()->find_prepopulate_text()); | 14 EXPECT_EQ(string16(), contents()->find_prepopulate_text()); |
| 15 EXPECT_EQ(string16(), contents()->find_text()); | 15 EXPECT_EQ(string16(), contents()->find_text()); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 // sensitive (as indicated by the last two params). | 53 // sensitive (as indicated by the last two params). |
| 54 contents()->StartFinding(search_term3, true, false); | 54 contents()->StartFinding(search_term3, true, false); |
| 55 | 55 |
| 56 // Once more, pre-populate string should always match between the two, but | 56 // Once more, pre-populate string should always match between the two, but |
| 57 // find_text should not. | 57 // find_text should not. |
| 58 EXPECT_EQ(search_term3, contents()->find_prepopulate_text()); | 58 EXPECT_EQ(search_term3, contents()->find_prepopulate_text()); |
| 59 EXPECT_EQ(search_term3, contents()->find_text()); | 59 EXPECT_EQ(search_term3, contents()->find_text()); |
| 60 EXPECT_EQ(search_term3, contents2.find_prepopulate_text()); | 60 EXPECT_EQ(search_term3, contents2.find_prepopulate_text()); |
| 61 EXPECT_EQ(search_term2, contents2.find_text()); | 61 EXPECT_EQ(search_term2, contents2.find_text()); |
| 62 } | 62 } |
| OLD | NEW |