| OLD | NEW |
| 1 // Copyright (c) 2011 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 // Tests for the top plugins to catch regressions in our plugin host code, as | 5 // Tests for the top plugins to catch regressions in our plugin host code, as |
| 6 // well as in the out of process code. Currently this tests: | 6 // well as in the out of process code. Currently this tests: |
| 7 // Flash | 7 // Flash |
| 8 // Real | 8 // Real |
| 9 // QuickTime | 9 // QuickTime |
| 10 // Windows Media Player | 10 // Windows Media Player |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include <string.h> | 25 #include <string.h> |
| 26 #include <memory.h> | 26 #include <memory.h> |
| 27 | 27 |
| 28 #include <string> | 28 #include <string> |
| 29 | 29 |
| 30 #include "base/file_path.h" | 30 #include "base/file_path.h" |
| 31 #include "base/file_util.h" | 31 #include "base/file_util.h" |
| 32 #include "base/message_loop.h" | 32 #include "base/message_loop.h" |
| 33 #include "base/path_service.h" | 33 #include "base/path_service.h" |
| 34 #include "base/test/test_timeouts.h" | 34 #include "base/test/test_timeouts.h" |
| 35 #include "chrome/browser/plugin_download_helper.h" | |
| 36 #include "chrome/common/chrome_switches.h" | 35 #include "chrome/common/chrome_switches.h" |
| 37 #include "chrome/common/chrome_paths.h" | 36 #include "chrome/common/chrome_paths.h" |
| 38 #include "chrome/test/automation/automation_proxy.h" | 37 #include "chrome/test/automation/automation_proxy.h" |
| 39 #include "chrome/test/automation/tab_proxy.h" | 38 #include "chrome/test/automation/tab_proxy.h" |
| 40 #include "chrome/test/base/ui_test_utils.h" | 39 #include "chrome/test/base/ui_test_utils.h" |
| 41 #include "chrome/test/ui/ui_test.h" | 40 #include "chrome/test/ui/ui_test.h" |
| 42 #include "content/browser/net/url_request_mock_http_job.h" | 41 #include "content/browser/net/url_request_mock_http_job.h" |
| 43 #include "net/base/net_util.h" | 42 #include "net/base/net_util.h" |
| 44 #include "net/url_request/url_request_context_getter.h" | 43 #include "net/url_request/url_request_context_getter.h" |
| 45 #include "net/url_request/url_request_test_util.h" | 44 #include "net/url_request/url_request_test_util.h" |
| 46 #include "third_party/npapi/bindings/npapi.h" | 45 #include "third_party/npapi/bindings/npapi.h" |
| 47 #include "webkit/plugins/npapi/plugin_constants_win.h" | 46 #include "webkit/plugins/npapi/plugin_constants_win.h" |
| 48 #include "webkit/plugins/npapi/plugin_list.h" | 47 #include "webkit/plugins/npapi/plugin_list.h" |
| 49 #include "webkit/plugins/plugin_switches.h" | 48 #include "webkit/plugins/plugin_switches.h" |
| 50 | 49 |
| 51 #if defined(OS_WIN) | 50 #if defined(OS_WIN) |
| 52 #include "base/win/registry.h" | 51 #include "base/win/registry.h" |
| 52 #include "chrome/browser/plugin_download_helper.h" |
| 53 #endif | 53 #endif |
| 54 | 54 |
| 55 class PluginTest : public UITest { | 55 class PluginTest : public UITest { |
| 56 public: | 56 public: |
| 57 // Generate the URL for testing a particular test. | 57 // Generate the URL for testing a particular test. |
| 58 // HTML for the tests is all located in test_directory\plugin\<testcase> | 58 // HTML for the tests is all located in test_directory\plugin\<testcase> |
| 59 // Set |mock_http| to true to use mock HTTP server. | 59 // Set |mock_http| to true to use mock HTTP server. |
| 60 static GURL GetTestUrl(const std::string& test_case, | 60 static GURL GetTestUrl(const std::string& test_case, |
| 61 const std::string& query, | 61 const std::string& query, |
| 62 bool mock_http) { | 62 bool mock_http) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { | 336 TEST_F(PluginInstallerDownloadTest, PluginInstallerDownloadPathTest) { |
| 337 MessageLoop loop(MessageLoop::TYPE_IO); | 337 MessageLoop loop(MessageLoop::TYPE_IO); |
| 338 Start(); | 338 Start(); |
| 339 loop.Run(); | 339 loop.Run(); |
| 340 | 340 |
| 341 EXPECT_TRUE(success()); | 341 EXPECT_TRUE(success()); |
| 342 EXPECT_TRUE(initial_download_path().BaseName().value() == | 342 EXPECT_TRUE(initial_download_path().BaseName().value() == |
| 343 final_download_path().BaseName().value()); | 343 final_download_path().BaseName().value()); |
| 344 } | 344 } |
| 345 #endif // defined(OS_WIN) | 345 #endif // defined(OS_WIN) |
| OLD | NEW |