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/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 } | 373 } |
374 | 374 |
375 private: | 375 private: |
376 scoped_refptr<TestNavigationListener> test_navigation_listener_; | 376 scoped_refptr<TestNavigationListener> test_navigation_listener_; |
377 scoped_ptr<TestContentBrowserClient> content_browser_client_; | 377 scoped_ptr<TestContentBrowserClient> content_browser_client_; |
378 content::ContentBrowserClient* original_content_browser_client_; | 378 content::ContentBrowserClient* original_content_browser_client_; |
379 | 379 |
380 DISALLOW_COPY_AND_ASSIGN(WebNavigationApiTest); | 380 DISALLOW_COPY_AND_ASSIGN(WebNavigationApiTest); |
381 }; | 381 }; |
382 | 382 |
383 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Api) { | 383 // Fails often on Windows dbg bots. http://crbug.com/177163 |
| 384 #if defined(OS_WIN) |
| 385 #define MAYBE_Api DISABLED_Api |
| 386 #else |
| 387 #define MAYBE_Api Api |
| 388 #endif // defined(OS_WIN) |
| 389 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Api) { |
384 ASSERT_TRUE( | 390 ASSERT_TRUE( |
385 RunExtensionSubtest("webnavigation", "test_api.html")) << message_; | 391 RunExtensionSubtest("webnavigation", "test_api.html")) << message_; |
386 } | 392 } |
387 | 393 |
388 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, GetFrame) { | 394 // Fails often on Windows dbg bots. http://crbug.com/177163 |
| 395 #if defined(OS_WIN) |
| 396 #define MAYBE_GetFrame DISABLED_GetFrame |
| 397 #else |
| 398 #define MAYBE_GetFrame GetFrame |
| 399 #endif // defined(OS_WIN) |
| 400 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_GetFrame) { |
389 ASSERT_TRUE( | 401 ASSERT_TRUE( |
390 RunExtensionSubtest("webnavigation", "test_getFrame.html")) << message_; | 402 RunExtensionSubtest("webnavigation", "test_getFrame.html")) << message_; |
391 } | 403 } |
392 | 404 |
393 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, ClientRedirect) { | 405 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, ClientRedirect) { |
394 ASSERT_TRUE( | 406 ASSERT_TRUE( |
395 RunExtensionSubtest("webnavigation", "test_clientRedirect.html")) | 407 RunExtensionSubtest("webnavigation", "test_clientRedirect.html")) |
396 << message_; | 408 << message_; |
397 } | 409 } |
398 | 410 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 ASSERT_TRUE( | 476 ASSERT_TRUE( |
465 RunExtensionSubtest("webnavigation", "test_referenceFragment.html")) | 477 RunExtensionSubtest("webnavigation", "test_referenceFragment.html")) |
466 << message_; | 478 << message_; |
467 } | 479 } |
468 | 480 |
469 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, SimpleLoad) { | 481 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, SimpleLoad) { |
470 ASSERT_TRUE( | 482 ASSERT_TRUE( |
471 RunExtensionSubtest("webnavigation", "test_simpleLoad.html")) << message_; | 483 RunExtensionSubtest("webnavigation", "test_simpleLoad.html")) << message_; |
472 } | 484 } |
473 | 485 |
474 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, Failures) { | 486 // Fails often on Windows dbg bots. http://crbug.com/177163 |
| 487 #if defined(OS_WIN) |
| 488 #define MAYBE_Failures DISABLED_Failures |
| 489 #else |
| 490 #define MAYBE_Failures Failures |
| 491 #endif // defined(OS_WIN) |
| 492 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Failures) { |
475 ASSERT_TRUE( | 493 ASSERT_TRUE( |
476 RunExtensionSubtest("webnavigation", "test_failures.html")) << message_; | 494 RunExtensionSubtest("webnavigation", "test_failures.html")) << message_; |
477 } | 495 } |
478 | 496 |
479 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, FilteredTest) { | 497 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, FilteredTest) { |
480 ASSERT_TRUE( | 498 ASSERT_TRUE( |
481 RunExtensionSubtest("webnavigation", "test_filtered.html")) << message_; | 499 RunExtensionSubtest("webnavigation", "test_filtered.html")) << message_; |
482 } | 500 } |
483 | 501 |
484 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, UserAction) { | 502 // Fails often on Windows dbg bots. http://crbug.com/177163 |
| 503 #if defined(OS_WIN) |
| 504 #define MAYBE_UserAction DISABLED_UserAction |
| 505 #else |
| 506 #define MAYBE_UserAction UserAction |
| 507 #endif // defined(OS_WIN) |
| 508 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_UserAction) { |
485 // Wait for the extension to set itself up and return control to us. | 509 // Wait for the extension to set itself up and return control to us. |
486 ASSERT_TRUE( | 510 ASSERT_TRUE( |
487 RunExtensionSubtest("webnavigation", "test_userAction.html")) << message_; | 511 RunExtensionSubtest("webnavigation", "test_userAction.html")) << message_; |
488 | 512 |
489 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 513 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); |
490 content::WaitForLoadStop(tab); | 514 content::WaitForLoadStop(tab); |
491 | 515 |
492 ResultCatcher catcher; | 516 ResultCatcher catcher; |
493 | 517 |
494 ExtensionService* service = extensions::ExtensionSystem::Get( | 518 ExtensionService* service = extensions::ExtensionSystem::Get( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 mouse_event.x = 7; | 564 mouse_event.x = 7; |
541 mouse_event.y = 7; | 565 mouse_event.y = 7; |
542 mouse_event.clickCount = 1; | 566 mouse_event.clickCount = 1; |
543 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); | 567 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); |
544 mouse_event.type = WebKit::WebInputEvent::MouseUp; | 568 mouse_event.type = WebKit::WebInputEvent::MouseUp; |
545 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); | 569 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); |
546 | 570 |
547 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 571 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
548 } | 572 } |
549 | 573 |
550 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, TargetBlank) { | 574 // Fails often on Windows dbg bots. http://crbug.com/177163 |
| 575 #if defined(OS_WIN) |
| 576 #define MAYBE_TargetBlank DISABLED_TargetBlank |
| 577 #else |
| 578 #define MAYBE_TargetBlank TargetBlank |
| 579 #endif // defined(OS_WIN) |
| 580 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_TargetBlank) { |
551 // Wait for the extension to set itself up and return control to us. | 581 // Wait for the extension to set itself up and return control to us. |
552 ASSERT_TRUE(RunExtensionSubtest("webnavigation", "test_targetBlank.html")) | 582 ASSERT_TRUE(RunExtensionSubtest("webnavigation", "test_targetBlank.html")) |
553 << message_; | 583 << message_; |
554 | 584 |
555 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 585 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); |
556 content::WaitForLoadStop(tab); | 586 content::WaitForLoadStop(tab); |
557 | 587 |
558 ResultCatcher catcher; | 588 ResultCatcher catcher; |
559 | 589 |
560 GURL url = test_server()->GetURL( | 590 GURL url = test_server()->GetURL( |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 url = GURL(base::StringPrintf( | 751 url = GURL(base::StringPrintf( |
722 "http://www.a.com:%d/" | 752 "http://www.a.com:%d/" |
723 "files/extensions/api_test/webnavigation/crash/b.html", | 753 "files/extensions/api_test/webnavigation/crash/b.html", |
724 test_server()->host_port_pair().port())); | 754 test_server()->host_port_pair().port())); |
725 ui_test_utils::NavigateToURL(browser(), url); | 755 ui_test_utils::NavigateToURL(browser(), url); |
726 | 756 |
727 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 757 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
728 } | 758 } |
729 | 759 |
730 } // namespace extensions | 760 } // namespace extensions |
OLD | NEW |