Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: chrome/browser/ui/views/find_bar_host_interactive_uitest.cc

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 string16 str; 346 string16 str;
347 views::ViewsDelegate::views_delegate->GetClipboard()-> 347 views::ViewsDelegate::views_delegate->GetClipboard()->
348 ReadText(ui::Clipboard::BUFFER_STANDARD, &str); 348 ReadText(ui::Clipboard::BUFFER_STANDARD, &str);
349 349
350 // Make sure the text is copied successfully. 350 // Make sure the text is copied successfully.
351 EXPECT_EQ(ASCIIToUTF16("a"), str); 351 EXPECT_EQ(ASCIIToUTF16("a"), str);
352 352
353 // Press Ctrl-V to paste the content back, it should start finding even if the 353 // Press Ctrl-V to paste the content back, it should start finding even if the
354 // content is not changed. 354 // content is not changed.
355 content::Source<WebContents> notification_source( 355 content::Source<WebContents> notification_source(
356 browser()->GetSelectedTabContents()); 356 browser()->GetSelectedWebContents());
357 ui_test_utils::WindowedNotificationObserverWithDetails 357 ui_test_utils::WindowedNotificationObserverWithDetails
358 <FindNotificationDetails> observer( 358 <FindNotificationDetails> observer(
359 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source); 359 chrome::NOTIFICATION_FIND_RESULT_AVAILABLE, notification_source);
360 360
361 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 361 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
362 browser(), ui::VKEY_V, true, false, false, false)); 362 browser(), ui::VKEY_V, true, false, false, false));
363 363
364 ASSERT_NO_FATAL_FAILURE(observer.Wait()); 364 ASSERT_NO_FATAL_FAILURE(observer.Wait());
365 FindNotificationDetails details; 365 FindNotificationDetails details;
366 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details)); 366 ASSERT_TRUE(observer.GetDetailsFor(notification_source.map_key(), &details));
367 EXPECT_TRUE(details.number_of_matches() > 0); 367 EXPECT_TRUE(details.number_of_matches() > 0);
368 } 368 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698