| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/process_util.h" | 5 #include "base/process_util.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/tabs/tab_strip_model.h" | 8 #include "chrome/browser/tabs/tab_strip_model.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 ReadText(ui::Clipboard::BUFFER_STANDARD, &str); | 318 ReadText(ui::Clipboard::BUFFER_STANDARD, &str); |
| 319 | 319 |
| 320 // Make sure the text is copied successfully. | 320 // Make sure the text is copied successfully. |
| 321 EXPECT_EQ(ASCIIToUTF16("a"), str); | 321 EXPECT_EQ(ASCIIToUTF16("a"), str); |
| 322 | 322 |
| 323 // Press Ctrl-V to paste the content back, it should start finding even if the | 323 // Press Ctrl-V to paste the content back, it should start finding even if the |
| 324 // content is not changed. | 324 // content is not changed. |
| 325 Source<TabContents> notification_source(browser()->GetSelectedTabContents()); | 325 Source<TabContents> notification_source(browser()->GetSelectedTabContents()); |
| 326 ui_test_utils::WindowedNotificationObserverWithDetails | 326 ui_test_utils::WindowedNotificationObserverWithDetails |
| 327 <FindNotificationDetails> observer( | 327 <FindNotificationDetails> observer( |
| 328 NotificationType::FIND_RESULT_AVAILABLE, notification_source); | 328 chrome::FIND_RESULT_AVAILABLE, notification_source); |
| 329 | 329 |
| 330 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( | 330 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( |
| 331 browser(), ui::VKEY_V, true, false, false, false)); | 331 browser(), ui::VKEY_V, true, false, false, false)); |
| 332 | 332 |
| 333 ASSERT_NO_FATAL_FAILURE(observer.Wait()); | 333 ASSERT_NO_FATAL_FAILURE(observer.Wait()); |
| 334 FindNotificationDetails details; | 334 FindNotificationDetails details; |
| 335 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details)); | 335 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details)); |
| 336 EXPECT_TRUE(details.number_of_matches() > 0); | 336 EXPECT_TRUE(details.number_of_matches() > 0); |
| 337 } | 337 } |
| OLD | NEW |