| 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 <queue> | 5 #include <queue> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 bool use_cross_process_frames_for_guests = GetParam(); | 733 bool use_cross_process_frames_for_guests = GetParam(); |
| 734 if (use_cross_process_frames_for_guests) | 734 if (use_cross_process_frames_for_guests) |
| 735 command_line->AppendSwitch(switches::kUseCrossProcessFramesForGuests); | 735 command_line->AppendSwitch(switches::kUseCrossProcessFramesForGuests); |
| 736 } | 736 } |
| 737 }; | 737 }; |
| 738 | 738 |
| 739 INSTANTIATE_TEST_CASE_P(WebViewTests, WebViewTest, testing::Bool()); | 739 INSTANTIATE_TEST_CASE_P(WebViewTests, WebViewTest, testing::Bool()); |
| 740 | 740 |
| 741 // The following test suits are created to group tests based on specific | 741 // The following test suits are created to group tests based on specific |
| 742 // features of <webview>. | 742 // features of <webview>. |
| 743 // These features current would not work with | 743 // These features currently do not work with |
| 744 // --use-cross-process-frames-for-guest and is disabled on | 744 // --use-cross-process-frames-for-guest and are disabled on |
| 745 // UseCrossProcessFramesForGuests. | 745 // kUseCrossProcessFramesForGuests. |
| 746 class WebViewNewWindowTest : public WebViewTest {}; | 746 class WebViewNewWindowTest : public WebViewTest {}; |
| 747 INSTANTIATE_TEST_CASE_P(WebViewTests, | 747 INSTANTIATE_TEST_CASE_P(WebViewTests, |
| 748 WebViewNewWindowTest, | 748 WebViewNewWindowTest, |
| 749 testing::Values(false)); | 749 testing::Values(false)); |
| 750 | 750 |
| 751 class WebViewSizeTest : public WebViewTest {}; | 751 class WebViewSizeTest : public WebViewTest {}; |
| 752 INSTANTIATE_TEST_CASE_P(WebViewTests, WebViewSizeTest, testing::Values(false)); | 752 INSTANTIATE_TEST_CASE_P(WebViewTests, WebViewSizeTest, testing::Values(false)); |
| 753 | 753 |
| 754 class WebViewSpeechAPITest : public WebViewTest {}; | 754 class WebViewSpeechAPITest : public WebViewTest {}; |
| 755 INSTANTIATE_TEST_CASE_P(WebViewTests, | 755 INSTANTIATE_TEST_CASE_P(WebViewTests, |
| 756 WebViewSpeechAPITest, | 756 WebViewSpeechAPITest, |
| 757 testing::Values(false)); | 757 testing::Values(false)); |
| 758 | 758 |
| 759 class WebViewVisibilityTest : public WebViewTest {}; | 759 class WebViewVisibilityTest : public WebViewTest {}; |
| 760 INSTANTIATE_TEST_CASE_P(WebViewTests, | 760 INSTANTIATE_TEST_CASE_P(WebViewTests, |
| 761 WebViewVisibilityTest, | 761 WebViewVisibilityTest, |
| 762 testing::Values(false)); | 762 testing::Bool()); |
| 763 | 763 |
| 764 class WebViewDPITest : public WebViewTest { | 764 class WebViewDPITest : public WebViewTest { |
| 765 protected: | 765 protected: |
| 766 void SetUpCommandLine(base::CommandLine* command_line) override { | 766 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 767 WebViewTest::SetUpCommandLine(command_line); | 767 WebViewTest::SetUpCommandLine(command_line); |
| 768 command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, | 768 command_line->AppendSwitchASCII(switches::kForceDeviceScaleFactor, |
| 769 base::StringPrintf("%f", scale())); | 769 base::StringPrintf("%f", scale())); |
| 770 } | 770 } |
| 771 | 771 |
| 772 static float scale() { return 2.0f; } | 772 static float scale() { return 2.0f; } |
| (...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3111 // 4 tasks expected. The order is arbitrary. | 3111 // 4 tasks expected. The order is arbitrary. |
| 3112 // Tab: about:blank, | 3112 // Tab: about:blank, |
| 3113 // Background Page: <webview> task manager test, | 3113 // Background Page: <webview> task manager test, |
| 3114 // App: <webview> task manager test, | 3114 // App: <webview> task manager test, |
| 3115 // Webview: WebViewed test content. | 3115 // Webview: WebViewed test content. |
| 3116 EXPECT_EQ(4U, task_manager.tasks().size()); | 3116 EXPECT_EQ(4U, task_manager.tasks().size()); |
| 3117 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); | 3117 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); |
| 3118 } | 3118 } |
| 3119 | 3119 |
| 3120 #endif // defined(ENABLE_TASK_MANAGER) | 3120 #endif // defined(ENABLE_TASK_MANAGER) |
| OLD | NEW |