| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 <oleacc.h> | 5 #include <oleacc.h> |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/win/scoped_bstr.h" | 9 #include "base/win/scoped_bstr.h" |
| 10 #include "base/win/scoped_com_initializer.h" | 10 #include "base/win/scoped_com_initializer.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 chrome::ExecuteCommand(browser(), IDC_FOCUS_LOCATION); | 210 chrome::ExecuteCommand(browser(), IDC_FOCUS_LOCATION); |
| 211 | 211 |
| 212 host_resolver()->AddRule("*", "127.0.0.1"); | 212 host_resolver()->AddRule("*", "127.0.0.1"); |
| 213 ASSERT_TRUE(embedded_test_server()->Start()); | 213 ASSERT_TRUE(embedded_test_server()->Start()); |
| 214 GURL main_url(embedded_test_server()->GetURL("/english_page.html")); | 214 GURL main_url(embedded_test_server()->GetURL("/english_page.html")); |
| 215 | 215 |
| 216 OmniboxViewViews* omnibox_view = | 216 OmniboxViewViews* omnibox_view = |
| 217 BrowserView::GetBrowserViewForBrowser(browser())-> | 217 BrowserView::GetBrowserViewForBrowser(browser())-> |
| 218 toolbar()->location_bar()->omnibox_view(); | 218 toolbar()->location_bar()->omnibox_view(); |
| 219 omnibox_view->SetUserText(base::UTF8ToUTF16(main_url.spec()), | 219 omnibox_view->SetUserText(base::UTF8ToUTF16(main_url.spec()), |
| 220 base::UTF8ToUTF16(main_url.spec()), | |
| 221 false); | 220 false); |
| 222 | 221 |
| 223 WinAccessibilityEventMonitor monitor(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS); | 222 WinAccessibilityEventMonitor monitor(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS); |
| 224 SendKeyPress(ui::VKEY_RETURN); | 223 SendKeyPress(ui::VKEY_RETURN); |
| 225 | 224 |
| 226 for (;;) { | 225 for (;;) { |
| 227 DWORD event; | 226 DWORD event; |
| 228 HWND hwnd; | 227 HWND hwnd; |
| 229 UINT role; | 228 UINT role; |
| 230 UINT state; | 229 UINT state; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 250 // second page. | 249 // second page. |
| 251 EXPECT_NE("First Page", name); | 250 EXPECT_NE("First Page", name); |
| 252 | 251 |
| 253 // Finish when we get an event on the second page. | 252 // Finish when we get an event on the second page. |
| 254 if (name == "This page is in English") { | 253 if (name == "This page is in English") { |
| 255 LOG(INFO) << "Got event on second page, finishing test."; | 254 LOG(INFO) << "Got event on second page, finishing test."; |
| 256 break; | 255 break; |
| 257 } | 256 } |
| 258 } | 257 } |
| 259 } | 258 } |
| OLD | NEW |