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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/macros.h" 5 #include "base/macros.h"
6 #include "base/strings/string_util.h" 6 #include "base/strings/string_util.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 EXPECT_TRUE(IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 491 EXPECT_TRUE(IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
492 492
493 // Search for "a". 493 // Search for "a".
494 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 494 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
495 browser(), ui::VKEY_A, false, false, false, false)); 495 browser(), ui::VKEY_A, false, false, false, false));
496 496
497 // We should find "a" here. 497 // We should find "a" here.
498 EXPECT_EQ(ASCIIToUTF16("a"), GetFindBarText()); 498 EXPECT_EQ(ASCIIToUTF16("a"), GetFindBarText());
499 499
500 // Reload the page to clear the matching result. 500 // Reload the page to clear the matching result.
501 chrome::Reload(browser(), CURRENT_TAB); 501 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB);
502 502
503 // Focus the Find bar again to make sure the text is selected. 503 // Focus the Find bar again to make sure the text is selected.
504 browser()->GetFindBarController()->Show(); 504 browser()->GetFindBarController()->Show();
505 505
506 EXPECT_TRUE(IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD)); 506 EXPECT_TRUE(IsViewFocused(browser(), VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
507 507
508 // "a" should be selected. 508 // "a" should be selected.
509 EXPECT_EQ(ASCIIToUTF16("a"), GetFindBarSelectedText()); 509 EXPECT_EQ(ASCIIToUTF16("a"), GetFindBarSelectedText());
510 510
511 // Press Ctrl-C to copy the content. 511 // Press Ctrl-C to copy the content.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 ui_test_utils::UrlLoadObserver observer( 552 ui_test_utils::UrlLoadObserver observer(
553 GURL("about:blank"), content::NotificationService::AllSources()); 553 GURL("about:blank"), content::NotificationService::AllSources());
554 554
555 // Send Ctrl-Enter, should cause navigation to about:blank. 555 // Send Ctrl-Enter, should cause navigation to about:blank.
556 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 556 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
557 browser(), ui::VKEY_RETURN, true, false, false, false)); 557 browser(), ui::VKEY_RETURN, true, false, false, false));
558 558
559 observer.Wait(); 559 observer.Wait();
560 } 560 }
561 #endif 561 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_install_dialog_view.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698