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

Side by Side Diff: chrome/browser/ui/browser_focus_uitest.cc

Issue 1409163006: Migrating tests to use EmbeddedTestServer (/chrome/browser misc) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month 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/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_util.h" 6 #include "base/files/file_util.h"
7 #include "base/format_macros.h" 7 #include "base/format_macros.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #endif 64 #endif
65 65
66 const char kSimplePage[] = "/focus/page_with_focus.html"; 66 const char kSimplePage[] = "/focus/page_with_focus.html";
67 const char kStealFocusPage[] = "/focus/page_steals_focus.html"; 67 const char kStealFocusPage[] = "/focus/page_steals_focus.html";
68 const char kTypicalPage[] = "/focus/typical_page.html"; 68 const char kTypicalPage[] = "/focus/typical_page.html";
69 69
70 class BrowserFocusTest : public InProcessBrowserTest { 70 class BrowserFocusTest : public InProcessBrowserTest {
71 public: 71 public:
72 // InProcessBrowserTest overrides: 72 // InProcessBrowserTest overrides:
73 void SetUpOnMainThread() override { 73 void SetUpOnMainThread() override {
74 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 74 ASSERT_TRUE(embedded_test_server()->Start());
75 } 75 }
76 76
77 bool IsViewFocused(ViewID vid) { 77 bool IsViewFocused(ViewID vid) {
78 return ui_test_utils::IsViewFocused(browser(), vid); 78 return ui_test_utils::IsViewFocused(browser(), vid);
79 } 79 }
80 80
81 void ClickOnView(ViewID vid) { 81 void ClickOnView(ViewID vid) {
82 ui_test_utils::ClickOnView(browser(), vid); 82 ui_test_utils::ClickOnView(browser(), vid);
83 } 83 }
84 84
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 content::NOTIFICATION_NAV_ENTRY_COMMITTED, 708 content::NOTIFICATION_NAV_ENTRY_COMMITTED,
709 content::NotificationService::AllSources()); 709 content::NotificationService::AllSources());
710 chrome::GoForward(browser(), CURRENT_TAB); 710 chrome::GoForward(browser(), CURRENT_TAB);
711 forward_nav_observer.Wait(); 711 forward_nav_observer.Wait();
712 } 712 }
713 713
714 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX)); 714 EXPECT_FALSE(IsViewFocused(VIEW_ID_OMNIBOX));
715 } 715 }
716 716
717 } // namespace 717 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/browser_navigator_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698