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 <list> | 5 #include <list> |
6 #include <set> | 6 #include <set> |
7 | 7 |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 583 |
584 // Wait for the extension to set itself up and return control to us. | 584 // Wait for the extension to set itself up and return control to us. |
585 ASSERT_TRUE(RunExtensionTestIncognito("webnavigation/targetBlank")) | 585 ASSERT_TRUE(RunExtensionTestIncognito("webnavigation/targetBlank")) |
586 << message_; | 586 << message_; |
587 | 587 |
588 ResultCatcher catcher; | 588 ResultCatcher catcher; |
589 | 589 |
590 GURL url = embedded_test_server()->GetURL( | 590 GURL url = embedded_test_server()->GetURL( |
591 "/extensions/api_test/webnavigation/targetBlank/a.html"); | 591 "/extensions/api_test/webnavigation/targetBlank/a.html"); |
592 | 592 |
593 Browser* otr_browser = ui_test_utils::OpenURLOffTheRecord( | 593 Browser* otr_browser = OpenURLOffTheRecord(browser()->profile(), url); |
594 browser()->profile(), url); | |
595 WebContents* tab = otr_browser->tab_strip_model()->GetActiveWebContents(); | 594 WebContents* tab = otr_browser->tab_strip_model()->GetActiveWebContents(); |
596 | 595 |
597 // There's a link with target=_blank on a.html. Click on it to open it in a | 596 // There's a link with target=_blank on a.html. Click on it to open it in a |
598 // new tab. | 597 // new tab. |
599 blink::WebMouseEvent mouse_event; | 598 blink::WebMouseEvent mouse_event; |
600 mouse_event.type = blink::WebInputEvent::MouseDown; | 599 mouse_event.type = blink::WebInputEvent::MouseDown; |
601 mouse_event.button = blink::WebMouseEvent::ButtonLeft; | 600 mouse_event.button = blink::WebMouseEvent::ButtonLeft; |
602 mouse_event.x = 7; | 601 mouse_event.x = 7; |
603 mouse_event.y = 7; | 602 mouse_event.y = 7; |
604 mouse_event.clickCount = 1; | 603 mouse_event.clickCount = 1; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
759 "extensions/api_test/webnavigation/crash/b.html", | 758 "extensions/api_test/webnavigation/crash/b.html", |
760 embedded_test_server()->port())); | 759 embedded_test_server()->port())); |
761 ui_test_utils::NavigateToURL(browser(), url); | 760 ui_test_utils::NavigateToURL(browser(), url); |
762 | 761 |
763 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 762 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
764 } | 763 } |
765 | 764 |
766 #endif | 765 #endif |
767 | 766 |
768 } // namespace extensions | 767 } // namespace extensions |
OLD | NEW |