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 "chrome/test/ui/ppapi_uitest.h" | 5 #include "chrome/test/ui/ppapi_uitest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
11 #include "base/string_util.h" | 11 #include "base/string_util.h" |
12 #include "base/test/test_timeouts.h" | 12 #include "base/test/test_timeouts.h" |
13 #include "base/timer.h" | 13 #include "base/timer.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/ui/browser.h" | 15 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_navigator.h" | 16 #include "chrome/browser/ui/browser_navigator.h" |
17 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
18 #include "chrome/common/chrome_switches.h" | 18 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/test/base/in_process_browser_test.h" | 19 #include "chrome/test/base/in_process_browser_test.h" |
20 #include "chrome/test/base/ui_test_utils.h" | 20 #include "chrome/test/base/ui_test_utils.h" |
21 #include "content/public/browser/dom_operation_notification_details.h" | 21 #include "content/public/browser/dom_operation_notification_details.h" |
22 #include "content/public/browser/notification_types.h" | 22 #include "content/public/browser/notification_types.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
| 24 #include "content/public/common/content_paths.h" |
24 #include "content/public/common/content_switches.h" | 25 #include "content/public/common/content_switches.h" |
25 #include "content/public/common/url_constants.h" | 26 #include "content/public/common/url_constants.h" |
26 #include "net/base/net_util.h" | 27 #include "net/base/net_util.h" |
27 #include "net/test/test_server.h" | 28 #include "net/test/test_server.h" |
28 #include "webkit/plugins/plugin_switches.h" | 29 #include "webkit/plugins/plugin_switches.h" |
29 | 30 |
30 using content::DomOperationNotificationDetails; | 31 using content::DomOperationNotificationDetails; |
31 using content::RenderViewHost; | 32 using content::RenderViewHost; |
32 | 33 |
33 namespace { | 34 namespace { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 ASSERT_TRUE(test_server.Start()); | 200 ASSERT_TRUE(test_server.Start()); |
200 std::string query = BuildQuery("files/test_case.html?", test_case); | 201 std::string query = BuildQuery("files/test_case.html?", test_case); |
201 | 202 |
202 GURL url = test_server.GetURL(query); | 203 GURL url = test_server.GetURL(query); |
203 RunTestURL(url); | 204 RunTestURL(url); |
204 } | 205 } |
205 | 206 |
206 void PPAPITestBase::RunTestWithWebSocketServer(const std::string& test_case) { | 207 void PPAPITestBase::RunTestWithWebSocketServer(const std::string& test_case) { |
207 FilePath websocket_root_dir; | 208 FilePath websocket_root_dir; |
208 ASSERT_TRUE( | 209 ASSERT_TRUE( |
209 PathService::Get(chrome::DIR_LAYOUT_TESTS, &websocket_root_dir)); | 210 PathService::Get(content::DIR_LAYOUT_TESTS, &websocket_root_dir)); |
210 | 211 |
211 ui_test_utils::TestWebSocketServer server; | 212 ui_test_utils::TestWebSocketServer server; |
212 int port = server.UseRandomPort(); | 213 int port = server.UseRandomPort(); |
213 ASSERT_TRUE(server.Start(websocket_root_dir)); | 214 ASSERT_TRUE(server.Start(websocket_root_dir)); |
214 std::string url = StringPrintf("%s&websocket_port=%d", | 215 std::string url = StringPrintf("%s&websocket_port=%d", |
215 test_case.c_str(), port); | 216 test_case.c_str(), port); |
216 RunTestViaHTTP(url); | 217 RunTestViaHTTP(url); |
217 } | 218 } |
218 | 219 |
219 std::string PPAPITestBase::StripPrefixes(const std::string& test_name) { | 220 std::string PPAPITestBase::StripPrefixes(const std::string& test_name) { |
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_OutOfRangeAccess) | 944 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_OutOfRangeAccess) |
944 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_EmptyArray) | 945 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_EmptyArray) |
945 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_InvalidElement) | 946 TEST_PPAPI_OUT_OF_PROCESS(ResourceArray_InvalidElement) |
946 | 947 |
947 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_Basics) | 948 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_Basics) |
948 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_RunWithoutQuit) | 949 TEST_PPAPI_IN_PROCESS(FlashMessageLoop_RunWithoutQuit) |
949 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_Basics) | 950 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_Basics) |
950 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_RunWithoutQuit) | 951 TEST_PPAPI_OUT_OF_PROCESS(FlashMessageLoop_RunWithoutQuit) |
951 | 952 |
952 #endif // ADDRESS_SANITIZER | 953 #endif // ADDRESS_SANITIZER |
OLD | NEW |