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/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/win/scoped_bstr.h" | 8 #include "base/win/scoped_bstr.h" |
9 #include "base/win/scoped_com_initializer.h" | 9 #include "base/win/scoped_com_initializer.h" |
10 #include "base/win/scoped_comptr.h" | 10 #include "base/win/scoped_comptr.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 DISABLED_TestNavigateToNewUrl) { | 201 DISABLED_TestNavigateToNewUrl) { |
202 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); | 202 content::BrowserAccessibilityState::GetInstance()->EnableAccessibility(); |
203 | 203 |
204 ui_test_utils::NavigateToURL(browser(), | 204 ui_test_utils::NavigateToURL(browser(), |
205 GURL("data:text/html;charset=utf-8," | 205 GURL("data:text/html;charset=utf-8," |
206 "<head><title>First Page</title></head>")); | 206 "<head><title>First Page</title></head>")); |
207 | 207 |
208 chrome::ExecuteCommand(browser(), IDC_FOCUS_LOCATION); | 208 chrome::ExecuteCommand(browser(), IDC_FOCUS_LOCATION); |
209 | 209 |
210 host_resolver()->AddRule("*", "127.0.0.1"); | 210 host_resolver()->AddRule("*", "127.0.0.1"); |
211 ASSERT_TRUE(test_server()->Start()); | 211 ASSERT_TRUE(embedded_test_server()->Start()); |
212 GURL main_url(test_server()->GetURL("files/english_page.html")); | 212 GURL main_url(embedded_test_server()->GetURL("/english_page.html")); |
213 | 213 |
214 OmniboxViewViews* omnibox_view = | 214 OmniboxViewViews* omnibox_view = |
215 BrowserView::GetBrowserViewForBrowser(browser())-> | 215 BrowserView::GetBrowserViewForBrowser(browser())-> |
216 toolbar()->location_bar()->omnibox_view(); | 216 toolbar()->location_bar()->omnibox_view(); |
217 omnibox_view->SetUserText(base::UTF8ToUTF16(main_url.spec()), | 217 omnibox_view->SetUserText(base::UTF8ToUTF16(main_url.spec()), |
218 base::UTF8ToUTF16(main_url.spec()), | 218 base::UTF8ToUTF16(main_url.spec()), |
219 false); | 219 false); |
220 | 220 |
221 WinAccessibilityEventMonitor monitor(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS); | 221 WinAccessibilityEventMonitor monitor(EVENT_OBJECT_FOCUS, EVENT_OBJECT_FOCUS); |
222 SendKeyPress(ui::VKEY_RETURN); | 222 SendKeyPress(ui::VKEY_RETURN); |
(...skipping 25 matching lines...) Expand all Loading... |
248 // second page. | 248 // second page. |
249 EXPECT_NE("First Page", name); | 249 EXPECT_NE("First Page", name); |
250 | 250 |
251 // Finish when we get an event on the second page. | 251 // Finish when we get an event on the second page. |
252 if (name == "This page is in English") { | 252 if (name == "This page is in English") { |
253 LOG(INFO) << "Got event on second page, finishing test."; | 253 LOG(INFO) << "Got event on second page, finishing test."; |
254 break; | 254 break; |
255 } | 255 } |
256 } | 256 } |
257 } | 257 } |
OLD | NEW |