| OLD | NEW |
| 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 "chrome/app/chrome_command_ids.h" | 5 #include "chrome/app/chrome_command_ids.h" |
| 6 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" | 6 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
| 7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/tab_contents/render_view_context_menu.h" | 10 #include "chrome/browser/tab_contents/render_view_context_menu.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 << message_; | 260 << message_; |
| 261 | 261 |
| 262 WebContents* tab = chrome::GetActiveWebContents(browser()); | 262 WebContents* tab = chrome::GetActiveWebContents(browser()); |
| 263 ui_test_utils::WaitForLoadStop(tab); | 263 ui_test_utils::WaitForLoadStop(tab); |
| 264 | 264 |
| 265 ResultCatcher catcher; | 265 ResultCatcher catcher; |
| 266 | 266 |
| 267 GURL url = test_server()->GetURL( | 267 GURL url = test_server()->GetURL( |
| 268 "files/extensions/api_test/webnavigation/targetBlank/a.html"); | 268 "files/extensions/api_test/webnavigation/targetBlank/a.html"); |
| 269 | 269 |
| 270 browser::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK); | 270 chrome::NavigateParams params(browser(), url, content::PAGE_TRANSITION_LINK); |
| 271 ui_test_utils::NavigateToURL(¶ms); | 271 ui_test_utils::NavigateToURL(¶ms); |
| 272 | 272 |
| 273 // There's a link with target=_blank on a.html. Click on it to open it in a | 273 // There's a link with target=_blank on a.html. Click on it to open it in a |
| 274 // new tab. | 274 // new tab. |
| 275 WebKit::WebMouseEvent mouse_event; | 275 WebKit::WebMouseEvent mouse_event; |
| 276 mouse_event.type = WebKit::WebInputEvent::MouseDown; | 276 mouse_event.type = WebKit::WebInputEvent::MouseDown; |
| 277 mouse_event.button = WebKit::WebMouseEvent::ButtonLeft; | 277 mouse_event.button = WebKit::WebMouseEvent::ButtonLeft; |
| 278 mouse_event.x = 7; | 278 mouse_event.x = 7; |
| 279 mouse_event.y = 7; | 279 mouse_event.y = 7; |
| 280 mouse_event.clickCount = 1; | 280 mouse_event.clickCount = 1; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 mouse_event.y = 7; | 315 mouse_event.y = 7; |
| 316 mouse_event.clickCount = 1; | 316 mouse_event.clickCount = 1; |
| 317 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); | 317 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); |
| 318 mouse_event.type = WebKit::WebInputEvent::MouseUp; | 318 mouse_event.type = WebKit::WebInputEvent::MouseUp; |
| 319 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); | 319 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); |
| 320 | 320 |
| 321 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 321 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 322 } | 322 } |
| 323 | 323 |
| 324 } // namespace extensions | 324 } // namespace extensions |
| OLD | NEW |