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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 const Extension* extension = | 230 const Extension* extension = |
231 service->GetExtensionById(last_loaded_extension_id(), false); | 231 service->GetExtensionById(last_loaded_extension_id(), false); |
232 GURL url = extension->GetResourceURL("newTab/a.html"); | 232 GURL url = extension->GetResourceURL("newTab/a.html"); |
233 | 233 |
234 ui_test_utils::NavigateToURL(browser(), url); | 234 ui_test_utils::NavigateToURL(browser(), url); |
235 | 235 |
236 // There's a link on a.html with target=_blank. Click on it to open it in a | 236 // There's a link on a.html with target=_blank. Click on it to open it in a |
237 // new tab. | 237 // new tab. |
238 blink::WebMouseEvent mouse_event; | 238 blink::WebMouseEvent mouse_event; |
239 mouse_event.type = blink::WebInputEvent::MouseDown; | 239 mouse_event.type = blink::WebInputEvent::MouseDown; |
240 mouse_event.button = blink::WebMouseEvent::ButtonLeft; | 240 mouse_event.button = blink::WebMouseEvent::Button::Left; |
241 mouse_event.x = 7; | 241 mouse_event.x = 7; |
242 mouse_event.y = 7; | 242 mouse_event.y = 7; |
243 mouse_event.clickCount = 1; | 243 mouse_event.clickCount = 1; |
244 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); | 244 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); |
245 mouse_event.type = blink::WebInputEvent::MouseUp; | 245 mouse_event.type = blink::WebInputEvent::MouseUp; |
246 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); | 246 tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event); |
247 | 247 |
248 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 248 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
249 } | 249 } |
250 | 250 |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 ASSERT_TRUE(granter); | 572 ASSERT_TRUE(granter); |
573 granter->RevokeForTesting(); | 573 granter->RevokeForTesting(); |
574 base::RunLoop().RunUntilIdle(); | 574 base::RunLoop().RunUntilIdle(); |
575 PerformXhrInPage(web_contents, kHost, port, kXhrPath); | 575 PerformXhrInPage(web_contents, kHost, port, kXhrPath); |
576 EXPECT_EQ(xhr_count, | 576 EXPECT_EQ(xhr_count, |
577 GetWebRequestCountFromBackgroundPage(extension, profile())); | 577 GetWebRequestCountFromBackgroundPage(extension, profile())); |
578 EXPECT_EQ(BLOCKED_ACTION_WEB_REQUEST, runner->GetBlockedActions(extension)); | 578 EXPECT_EQ(BLOCKED_ACTION_WEB_REQUEST, runner->GetBlockedActions(extension)); |
579 } | 579 } |
580 | 580 |
581 } // namespace extensions | 581 } // namespace extensions |
OLD | NEW |