Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/native_app_window.h" | 5 #include "apps/native_app_window.h" |
| 6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/apps/app_browsertest_util.h" | 8 #include "chrome/browser/apps/app_browsertest_util.h" |
| 9 #include "chrome/browser/automation/automation_util.h" | 9 #include "chrome/browser/automation/automation_util.h" |
| 10 #include "chrome/browser/extensions/extension_test_message_listener.h" | 10 #include "chrome/browser/extensions/extension_test_message_listener.h" |
| 11 #include "chrome/browser/prerender/prerender_link_manager.h" | 11 #include "chrome/browser/prerender/prerender_link_manager.h" |
| 12 #include "chrome/browser/prerender/prerender_link_manager_factory.h" | 12 #include "chrome/browser/prerender/prerender_link_manager_factory.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "chrome/common/extensions/extension.h" | 16 #include "chrome/common/extensions/extension.h" |
| 17 #include "chrome/test/base/ui_test_utils.h" | 17 #include "chrome/test/base/ui_test_utils.h" |
| 18 #include "content/public/browser/gpu_data_manager.h" | 18 #include "content/public/browser/gpu_data_manager.h" |
|
gab
2013/09/27 13:18:06
I think you can now remove this include too; at le
| |
| 19 #include "content/public/browser/interstitial_page.h" | 19 #include "content/public/browser/interstitial_page.h" |
| 20 #include "content/public/browser/interstitial_page_delegate.h" | 20 #include "content/public/browser/interstitial_page_delegate.h" |
| 21 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
| 22 #include "content/public/browser/render_process_host.h" | 22 #include "content/public/browser/render_process_host.h" |
| 23 #include "content/public/browser/web_contents_delegate.h" | 23 #include "content/public/browser/web_contents_delegate.h" |
| 24 #include "content/public/common/content_switches.h" | 24 #include "content/public/common/content_switches.h" |
| 25 #include "content/public/test/browser_test_utils.h" | 25 #include "content/public/test/browser_test_utils.h" |
| 26 #include "content/public/test/fake_speech_recognition_manager.h" | 26 #include "content/public/test/fake_speech_recognition_manager.h" |
| 27 #include "net/test/embedded_test_server/embedded_test_server.h" | 27 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 28 #include "net/test/embedded_test_server/http_request.h" | 28 #include "net/test/embedded_test_server/http_request.h" |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 588 #if !defined(OS_CHROMEOS) | 588 #if !defined(OS_CHROMEOS) |
| 589 // This test ensures <webview> doesn't crash in SW rendering when autosize is | 589 // This test ensures <webview> doesn't crash in SW rendering when autosize is |
| 590 // turned on. | 590 // turned on. |
| 591 IN_PROC_BROWSER_TEST_F(WebViewTest, AutoSizeSW) { | 591 IN_PROC_BROWSER_TEST_F(WebViewTest, AutoSizeSW) { |
| 592 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize")) | 592 ASSERT_TRUE(RunPlatformAppTest("platform_apps/web_view/autosize")) |
| 593 << message_; | 593 << message_; |
| 594 } | 594 } |
| 595 #endif | 595 #endif |
| 596 | 596 |
| 597 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeAfterNavigation) { | 597 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeAfterNavigation) { |
| 598 #if defined(USE_AURA) | |
| 599 // TODO(gab): Fix this test in software compositing mode: | |
| 600 // http://crbug.com/295801. | |
| 601 if (!content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) | |
| 602 return; | |
| 603 #endif | |
| 604 TestHelper("testAutosizeAfterNavigation", | 598 TestHelper("testAutosizeAfterNavigation", |
| 605 "DoneShimTest.PASSED", | 599 "DoneShimTest.PASSED", |
| 606 "DoneShimTest.FAILED", | 600 "DoneShimTest.FAILED", |
| 607 "web_view/shim"); | 601 "web_view/shim"); |
| 608 } | 602 } |
| 609 | 603 |
| 610 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeBeforeNavigation) { | 604 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeBeforeNavigation) { |
| 611 #if defined(USE_AURA) | |
| 612 // TODO(gab): Fix this test in software compositing mode: | |
| 613 // http://crbug.com/295801. | |
| 614 if (!content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) | |
| 615 return; | |
| 616 #endif | |
| 617 TestHelper("testAutosizeBeforeNavigation", | 605 TestHelper("testAutosizeBeforeNavigation", |
| 618 "DoneShimTest.PASSED", | 606 "DoneShimTest.PASSED", |
| 619 "DoneShimTest.FAILED", | 607 "DoneShimTest.FAILED", |
| 620 "web_view/shim"); | 608 "web_view/shim"); |
| 621 } | 609 } |
| 622 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeRemoveAttributes) { | 610 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAutosizeRemoveAttributes) { |
| 623 #if defined(USE_AURA) | |
| 624 // TODO(gab): Fix this test in software compositing mode: | |
| 625 // http://crbug.com/295801. | |
| 626 if (!content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) | |
| 627 return; | |
| 628 #endif | |
| 629 TestHelper("testAutosizeRemoveAttributes", | 611 TestHelper("testAutosizeRemoveAttributes", |
| 630 "DoneShimTest.PASSED", | 612 "DoneShimTest.PASSED", |
| 631 "DoneShimTest.FAILED", | 613 "DoneShimTest.FAILED", |
| 632 "web_view/shim"); | 614 "web_view/shim"); |
| 633 } | 615 } |
| 634 | 616 |
| 635 // This test is disabled due to being flaky. http://crbug.com/282116 | 617 // This test is disabled due to being flaky. http://crbug.com/282116 |
| 636 #if defined(OS_WIN) | 618 #if defined(OS_WIN) |
| 637 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \ | 619 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \ |
| 638 DISABLED_Shim_TestAutosizeWithPartialAttributes | 620 DISABLED_Shim_TestAutosizeWithPartialAttributes |
| 639 #else | 621 #else |
| 640 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \ | 622 #define MAYBE_Shim_TestAutosizeWithPartialAttributes \ |
| 641 Shim_TestAutosizeWithPartialAttributes | 623 Shim_TestAutosizeWithPartialAttributes |
| 642 #endif | 624 #endif |
| 643 IN_PROC_BROWSER_TEST_F(WebViewTest, | 625 IN_PROC_BROWSER_TEST_F(WebViewTest, |
| 644 MAYBE_Shim_TestAutosizeWithPartialAttributes) { | 626 MAYBE_Shim_TestAutosizeWithPartialAttributes) { |
| 645 #if defined(USE_AURA) | |
| 646 // TODO(gab): Fix this test in software compositing mode: | |
| 647 // http://crbug.com/295801. | |
| 648 if (!content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) | |
| 649 return; | |
| 650 #endif | |
| 651 TestHelper("testAutosizeWithPartialAttributes", | 627 TestHelper("testAutosizeWithPartialAttributes", |
| 652 "DoneShimTest.PASSED", | 628 "DoneShimTest.PASSED", |
| 653 "DoneShimTest.FAILED", | 629 "DoneShimTest.FAILED", |
| 654 "web_view/shim"); | 630 "web_view/shim"); |
| 655 } | 631 } |
| 656 | 632 |
| 657 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAPIMethodExistence) { | 633 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestAPIMethodExistence) { |
| 658 TestHelper("testAPIMethodExistence", | 634 TestHelper("testAPIMethodExistence", |
| 659 "DoneShimTest.PASSED", | 635 "DoneShimTest.PASSED", |
| 660 "DoneShimTest.FAILED", | 636 "DoneShimTest.FAILED", |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 963 } | 939 } |
| 964 | 940 |
| 965 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavigationToExternalProtocol) { | 941 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestNavigationToExternalProtocol) { |
| 966 TestHelper("testNavigationToExternalProtocol", | 942 TestHelper("testNavigationToExternalProtocol", |
| 967 "DoneShimTest.PASSED", | 943 "DoneShimTest.PASSED", |
| 968 "DoneShimTest.FAILED", | 944 "DoneShimTest.FAILED", |
| 969 "web_view/shim"); | 945 "web_view/shim"); |
| 970 } | 946 } |
| 971 | 947 |
| 972 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestResizeWebviewResizesContent) { | 948 IN_PROC_BROWSER_TEST_F(WebViewTest, Shim_TestResizeWebviewResizesContent) { |
| 973 #if defined(USE_AURA) | |
| 974 // TODO(gab): Fix this test in software compositing mode: | |
| 975 // http://crbug.com/295801. | |
| 976 if (!content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) | |
| 977 return; | |
| 978 #endif | |
| 979 TestHelper("testResizeWebviewResizesContent", | 949 TestHelper("testResizeWebviewResizesContent", |
| 980 "DoneShimTest.PASSED", | 950 "DoneShimTest.PASSED", |
| 981 "DoneShimTest.FAILED", | 951 "DoneShimTest.FAILED", |
| 982 "web_view/shim"); | 952 "web_view/shim"); |
| 983 } | 953 } |
| 984 | 954 |
| 985 // This test makes sure we do not crash if app is closed while interstitial | 955 // This test makes sure we do not crash if app is closed while interstitial |
| 986 // page is being shown in guest. | 956 // page is being shown in guest. |
| 987 // Test flaky on windows; http://crbug.com/297014 . | 957 // Test flaky on windows; http://crbug.com/297014 . |
| 988 #if defined(OS_WIN) | 958 #if defined(OS_WIN) |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1776 "DoneDialogTest.FAILED", | 1746 "DoneDialogTest.FAILED", |
| 1777 "web_view/dialog"); | 1747 "web_view/dialog"); |
| 1778 } | 1748 } |
| 1779 | 1749 |
| 1780 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestPromptDialog) { | 1750 IN_PROC_BROWSER_TEST_F(WebViewTest, Dialog_TestPromptDialog) { |
| 1781 TestHelper("testPromptDialog", | 1751 TestHelper("testPromptDialog", |
| 1782 "DoneDialogTest.PASSED", | 1752 "DoneDialogTest.PASSED", |
| 1783 "DoneDialogTest.FAILED", | 1753 "DoneDialogTest.FAILED", |
| 1784 "web_view/dialog"); | 1754 "web_view/dialog"); |
| 1785 } | 1755 } |
| OLD | NEW |