OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 // windows headers | 8 // windows headers |
9 #include <comutil.h> | 9 #include <comutil.h> |
10 #include <shellapi.h> | 10 #include <shellapi.h> |
11 #include <shlobj.h> | 11 #include <shlobj.h> |
12 #include <windows.h> | 12 #include <windows.h> |
13 #endif | 13 #endif |
14 | 14 |
15 // runtime headers | 15 // runtime headers |
16 #include <memory.h> | 16 #include <memory.h> |
17 #include <stdlib.h> | 17 #include <stdlib.h> |
18 #include <string.h> | 18 #include <string.h> |
19 | 19 |
20 #include <ostream> | 20 #include <ostream> |
21 | 21 |
22 #include "base/file_path.h" | 22 #include "base/file_path.h" |
23 #include "base/string_number_conversions.h" | 23 #include "base/string_number_conversions.h" |
| 24 #include "base/test/test_timeouts.h" |
24 #include "chrome/browser/net/url_request_mock_http_job.h" | 25 #include "chrome/browser/net/url_request_mock_http_job.h" |
25 #include "chrome/common/chrome_paths.h" | 26 #include "chrome/common/chrome_paths.h" |
26 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
27 #include "chrome/test/automation/browser_proxy.h" | 28 #include "chrome/test/automation/browser_proxy.h" |
28 #include "chrome/test/automation/tab_proxy.h" | 29 #include "chrome/test/automation/tab_proxy.h" |
29 #include "chrome/test/automation/window_proxy.h" | 30 #include "chrome/test/automation/window_proxy.h" |
30 #include "chrome/test/ui/npapi_test_helper.h" | 31 #include "chrome/test/ui/npapi_test_helper.h" |
31 #include "chrome/test/ui_test_utils.h" | 32 #include "chrome/test/ui_test_utils.h" |
32 | 33 |
33 using npapi_test::kTestCompleteCookie; | 34 using npapi_test::kTestCompleteCookie; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 TEST_F(NPAPIVisiblePluginTester, FLAKY_OpenPopupWindowWithPlugin) { | 246 TEST_F(NPAPIVisiblePluginTester, FLAKY_OpenPopupWindowWithPlugin) { |
246 if (ProxyLauncher::in_process_renderer()) | 247 if (ProxyLauncher::in_process_renderer()) |
247 return; | 248 return; |
248 | 249 |
249 const FilePath test_case( | 250 const FilePath test_case( |
250 FILE_PATH_LITERAL("get_javascript_open_popup_with_plugin.html")); | 251 FILE_PATH_LITERAL("get_javascript_open_popup_with_plugin.html")); |
251 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 252 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
252 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 253 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
253 WaitForFinish("plugin_popup_with_plugin_target", "1", url, | 254 WaitForFinish("plugin_popup_with_plugin_target", "1", url, |
254 kTestCompleteCookie, kTestCompleteSuccess, | 255 kTestCompleteCookie, kTestCompleteSuccess, |
255 action_timeout_ms()); | 256 TestTimeouts::action_timeout_ms()); |
256 } | 257 } |
257 | 258 |
258 // Test checking the privacy mode is off. | 259 // Test checking the privacy mode is off. |
259 TEST_F(NPAPITesterBase, PrivateDisabled) { | 260 TEST_F(NPAPITesterBase, PrivateDisabled) { |
260 if (ProxyLauncher::in_process_renderer()) | 261 if (ProxyLauncher::in_process_renderer()) |
261 return; | 262 return; |
262 | 263 |
263 const FilePath test_case(FILE_PATH_LITERAL("private.html")); | 264 const FilePath test_case(FILE_PATH_LITERAL("private.html")); |
264 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); | 265 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); |
265 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 266 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); | 412 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); |
412 | 413 |
413 scoped_refptr<TabProxy> tab(browser->GetTab(0)); | 414 scoped_refptr<TabProxy> tab(browser->GetTab(0)); |
414 ASSERT_TRUE(tab.get()); | 415 ASSERT_TRUE(tab.get()); |
415 | 416 |
416 ASSERT_TRUE(tab->LoadBlockedPlugins()); | 417 ASSERT_TRUE(tab->LoadBlockedPlugins()); |
417 | 418 |
418 WaitForFinish("setup", "1", url, kTestCompleteCookie, | 419 WaitForFinish("setup", "1", url, kTestCompleteCookie, |
419 kTestCompleteSuccess, action_max_timeout_ms()); | 420 kTestCompleteSuccess, action_max_timeout_ms()); |
420 } | 421 } |
OLD | NEW |