| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 10 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 net::URLRequestMockHTTPJob::AddUrlHandler( | 42 net::URLRequestMockHTTPJob::AddUrlHandler( |
| 43 path, content::BrowserThread::GetBlockingPool()); | 43 path, content::BrowserThread::GetBlockingPool()); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } | 46 } |
| 47 | 47 |
| 48 class PluginTest : public ContentBrowserTest { | 48 class PluginTest : public ContentBrowserTest { |
| 49 protected: | 49 protected: |
| 50 PluginTest() {} | 50 PluginTest() {} |
| 51 | 51 |
| 52 void SetUpCommandLine(CommandLine* command_line) override { | 52 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 53 // Some NPAPI tests schedule garbage collection to force object tear-down. | 53 // Some NPAPI tests schedule garbage collection to force object tear-down. |
| 54 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose_gc"); | 54 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose_gc"); |
| 55 | 55 |
| 56 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
| 57 const testing::TestInfo* const test_info = | 57 const testing::TestInfo* const test_info = |
| 58 testing::UnitTest::GetInstance()->current_test_info(); | 58 testing::UnitTest::GetInstance()->current_test_info(); |
| 59 if (strcmp(test_info->name(), "MediaPlayerNew") == 0) { | 59 if (strcmp(test_info->name(), "MediaPlayerNew") == 0) { |
| 60 // The installer adds our process names to the registry key below. Since | 60 // The installer adds our process names to the registry key below. Since |
| 61 // the installer might not have run on this machine, add it manually. | 61 // the installer might not have run on this machine, add it manually. |
| 62 base::win::RegKey regkey; | 62 base::win::RegKey regkey; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 ResourceDispatcherHostDelegate* old_delegate = | 557 ResourceDispatcherHostDelegate* old_delegate = |
| 558 ResourceDispatcherHostImpl::Get()->delegate(); | 558 ResourceDispatcherHostImpl::Get()->delegate(); |
| 559 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); | 559 ResourceDispatcherHostImpl::Get()->SetDelegate(&test_delegate); |
| 560 LoadAndWait(url); | 560 LoadAndWait(url); |
| 561 test_delegate.WaitForPluginRequest(); | 561 test_delegate.WaitForPluginRequest(); |
| 562 ASSERT_TRUE(test_delegate.found_cookie()); | 562 ASSERT_TRUE(test_delegate.found_cookie()); |
| 563 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); | 563 ResourceDispatcherHostImpl::Get()->SetDelegate(old_delegate); |
| 564 } | 564 } |
| 565 | 565 |
| 566 } // namespace content | 566 } // namespace content |
| OLD | NEW |