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/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // Fails often on Windows dbg bots. http://crbug.com/177163 | 383 // Fails often on Windows dbg bots. http://crbug.com/177163 |
384 #if defined(OS_WIN) | 384 #if defined(OS_WIN) && !defined(NDEBUG) |
385 #define MAYBE_Api DISABLED_Api | 385 #define MAYBE_Api DISABLED_Api |
386 #else | 386 #else |
387 #define MAYBE_Api Api | 387 #define MAYBE_Api Api |
388 #endif // defined(OS_WIN) | 388 #endif // defined(OS_WIN) |
389 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Api) { | 389 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Api) { |
390 ASSERT_TRUE(StartEmbeddedTestServer()); | 390 ASSERT_TRUE(StartEmbeddedTestServer()); |
391 ASSERT_TRUE( | 391 ASSERT_TRUE( |
392 RunExtensionSubtest("webnavigation", "test_api.html")) << message_; | 392 RunExtensionSubtest("webnavigation", "test_api.html")) << message_; |
393 } | 393 } |
394 | 394 |
395 // Fails often on Windows dbg bots. http://crbug.com/177163 | 395 // Fails often on Windows dbg bots. http://crbug.com/177163 |
396 #if defined(OS_WIN) | 396 #if defined(OS_WIN) && !defined(NDEBUG) |
397 #define MAYBE_GetFrame DISABLED_GetFrame | 397 #define MAYBE_GetFrame DISABLED_GetFrame |
398 #else | 398 #else |
399 #define MAYBE_GetFrame GetFrame | 399 #define MAYBE_GetFrame GetFrame |
400 #endif // defined(OS_WIN) | 400 #endif // defined(OS_WIN) |
401 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_GetFrame) { | 401 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_GetFrame) { |
402 ASSERT_TRUE(StartEmbeddedTestServer()); | 402 ASSERT_TRUE(StartEmbeddedTestServer()); |
403 ASSERT_TRUE( | 403 ASSERT_TRUE( |
404 RunExtensionSubtest("webnavigation", "test_getFrame.html")) << message_; | 404 RunExtensionSubtest("webnavigation", "test_getFrame.html")) << message_; |
405 } | 405 } |
406 | 406 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 << message_; | 490 << message_; |
491 } | 491 } |
492 | 492 |
493 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, SimpleLoad) { | 493 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, SimpleLoad) { |
494 ASSERT_TRUE(StartEmbeddedTestServer()); | 494 ASSERT_TRUE(StartEmbeddedTestServer()); |
495 ASSERT_TRUE( | 495 ASSERT_TRUE( |
496 RunExtensionSubtest("webnavigation", "test_simpleLoad.html")) << message_; | 496 RunExtensionSubtest("webnavigation", "test_simpleLoad.html")) << message_; |
497 } | 497 } |
498 | 498 |
499 // Fails often on Windows dbg bots. http://crbug.com/177163 | 499 // Fails often on Windows dbg bots. http://crbug.com/177163 |
500 #if defined(OS_WIN) | 500 #if defined(OS_WIN) && !defined(NDEBUG) |
501 #define MAYBE_Failures DISABLED_Failures | 501 #define MAYBE_Failures DISABLED_Failures |
502 #else | 502 #else |
503 #define MAYBE_Failures Failures | 503 #define MAYBE_Failures Failures |
504 #endif // defined(OS_WIN) | 504 #endif // defined(OS_WIN) |
505 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Failures) { | 505 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_Failures) { |
506 ASSERT_TRUE(StartEmbeddedTestServer()); | 506 ASSERT_TRUE(StartEmbeddedTestServer()); |
507 ASSERT_TRUE( | 507 ASSERT_TRUE( |
508 RunExtensionSubtest("webnavigation", "test_failures.html")) << message_; | 508 RunExtensionSubtest("webnavigation", "test_failures.html")) << message_; |
509 } | 509 } |
510 | 510 |
511 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, FilteredTest) { | 511 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, FilteredTest) { |
512 ASSERT_TRUE(StartEmbeddedTestServer()); | 512 ASSERT_TRUE(StartEmbeddedTestServer()); |
513 ASSERT_TRUE( | 513 ASSERT_TRUE( |
514 RunExtensionSubtest("webnavigation", "test_filtered.html")) << message_; | 514 RunExtensionSubtest("webnavigation", "test_filtered.html")) << message_; |
515 } | 515 } |
516 | 516 |
517 // Fails often on Windows dbg bots. http://crbug.com/177163 | 517 // Fails often on Windows dbg bots. http://crbug.com/177163 |
518 #if defined(OS_WIN) | 518 #if defined(OS_WIN) && !defined(NDEBUG) |
519 #define MAYBE_UserAction DISABLED_UserAction | 519 #define MAYBE_UserAction DISABLED_UserAction |
520 #else | 520 #else |
521 #define MAYBE_UserAction UserAction | 521 #define MAYBE_UserAction UserAction |
522 #endif // defined(OS_WIN) | 522 #endif // defined(OS_WIN) |
523 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_UserAction) { | 523 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_UserAction) { |
524 ASSERT_TRUE(StartEmbeddedTestServer()); | 524 ASSERT_TRUE(StartEmbeddedTestServer()); |
525 | 525 |
526 // Wait for the extension to set itself up and return control to us. | 526 // Wait for the extension to set itself up and return control to us. |
527 ASSERT_TRUE( | 527 ASSERT_TRUE( |
528 RunExtensionSubtest("webnavigation", "test_userAction.html")) << message_; | 528 RunExtensionSubtest("webnavigation", "test_userAction.html")) << message_; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 mouse_event.y = 7; | 590 mouse_event.y = 7; |
591 mouse_event.clickCount = 1; | 591 mouse_event.clickCount = 1; |
592 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); | 592 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); |
593 mouse_event.type = WebKit::WebInputEvent::MouseUp; | 593 mouse_event.type = WebKit::WebInputEvent::MouseUp; |
594 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); | 594 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); |
595 | 595 |
596 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 596 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
597 } | 597 } |
598 | 598 |
599 // Fails often on Windows dbg bots. http://crbug.com/177163 | 599 // Fails often on Windows dbg bots. http://crbug.com/177163 |
600 #if defined(OS_WIN) | 600 #if defined(OS_WIN) && !defined(NDEBUG) |
601 #define MAYBE_TargetBlank DISABLED_TargetBlank | 601 #define MAYBE_TargetBlank DISABLED_TargetBlank |
602 #else | 602 #else |
603 #define MAYBE_TargetBlank TargetBlank | 603 #define MAYBE_TargetBlank TargetBlank |
604 #endif // defined(OS_WIN) | 604 #endif // defined(OS_WIN) |
605 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_TargetBlank) { | 605 IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, MAYBE_TargetBlank) { |
606 ASSERT_TRUE(StartEmbeddedTestServer()); | 606 ASSERT_TRUE(StartEmbeddedTestServer()); |
607 | 607 |
608 // Wait for the extension to set itself up and return control to us. | 608 // Wait for the extension to set itself up and return control to us. |
609 ASSERT_TRUE(RunExtensionSubtest("webnavigation", "test_targetBlank.html")) | 609 ASSERT_TRUE(RunExtensionSubtest("webnavigation", "test_targetBlank.html")) |
610 << message_; | 610 << message_; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 url = GURL(base::StringPrintf( | 801 url = GURL(base::StringPrintf( |
802 "http://www.a.com:%d/" | 802 "http://www.a.com:%d/" |
803 "extensions/api_test/webnavigation/crash/b.html", | 803 "extensions/api_test/webnavigation/crash/b.html", |
804 embedded_test_server()->port())); | 804 embedded_test_server()->port())); |
805 ui_test_utils::NavigateToURL(browser(), url); | 805 ui_test_utils::NavigateToURL(browser(), url); |
806 | 806 |
807 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 807 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
808 } | 808 } |
809 | 809 |
810 } // namespace extensions | 810 } // namespace extensions |
OLD | NEW |