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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 GURL url = extension->GetResourceURL("newTab/a.html"); | 271 GURL url = extension->GetResourceURL("newTab/a.html"); |
272 | 272 |
273 ui_test_utils::NavigateToURL(browser(), url); | 273 ui_test_utils::NavigateToURL(browser(), url); |
274 | 274 |
275 // There's a link on a.html with target=_blank. Click on it to open it in a | 275 // There's a link on a.html with target=_blank. Click on it to open it in a |
276 // new tab. | 276 // new tab. |
277 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown, | 277 blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown, |
278 blink::WebInputEvent::NoModifiers, | 278 blink::WebInputEvent::NoModifiers, |
279 blink::WebInputEvent::TimeStampForTesting); | 279 blink::WebInputEvent::TimeStampForTesting); |
280 mouse_event.button = blink::WebMouseEvent::Button::Left; | 280 mouse_event.button = blink::WebMouseEvent::Button::Left; |
281 mouse_event.x = 7; | 281 mouse_event.setPositionInWidget(7, 7); |
282 mouse_event.y = 7; | |
283 mouse_event.clickCount = 1; | 282 mouse_event.clickCount = 1; |
284 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); | 283 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); |
285 mouse_event.setType(blink::WebInputEvent::MouseUp); | 284 mouse_event.setType(blink::WebInputEvent::MouseUp); |
286 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); | 285 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); |
287 | 286 |
288 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 287 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
289 } | 288 } |
290 | 289 |
291 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestDeclarative1) { | 290 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, WebRequestDeclarative1) { |
292 ASSERT_TRUE(StartEmbeddedTestServer()); | 291 ASSERT_TRUE(StartEmbeddedTestServer()); |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 // requests when authenrication is requested by server. | 666 // requests when authenrication is requested by server. |
668 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, | 667 IN_PROC_BROWSER_TEST_F(ExtensionWebRequestApiTest, |
669 WebSocketRequestAuthRequired) { | 668 WebSocketRequestAuthRequired) { |
670 ASSERT_TRUE(StartEmbeddedTestServer()); | 669 ASSERT_TRUE(StartEmbeddedTestServer()); |
671 ASSERT_TRUE(StartWebSocketServer(net::GetWebSocketTestDataDirectory(), true)); | 670 ASSERT_TRUE(StartWebSocketServer(net::GetWebSocketTestDataDirectory(), true)); |
672 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_websocket_auth.html")) | 671 ASSERT_TRUE(RunExtensionSubtest("webrequest", "test_websocket_auth.html")) |
673 << message_; | 672 << message_; |
674 } | 673 } |
675 | 674 |
676 } // namespace extensions | 675 } // namespace extensions |
OLD | NEW |