OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/thread.h" | 5 #include "base/thread.h" |
6 #include "base/time.h" | 6 #include "base/time.h" |
7 #include "chrome/browser/net/url_fetcher.h" | 7 #include "chrome/browser/net/url_fetcher.h" |
8 #include "chrome/browser/net/url_fetcher_protect.h" | 8 #include "chrome/browser/net/url_fetcher_protect.h" |
9 #if defined(OS_LINUX) | |
10 // TODO(port): ugly hack for linux | |
11 namespace ChromePluginLib { | |
12 void UnloadAllPlugins() {} | |
13 } | |
14 #else | |
15 #include "chrome/common/chrome_plugin_lib.h" | 9 #include "chrome/common/chrome_plugin_lib.h" |
16 #endif | |
17 #include "net/base/ssl_test_util.h" | 10 #include "net/base/ssl_test_util.h" |
18 #include "net/url_request/url_request_unittest.h" | 11 #include "net/url_request/url_request_unittest.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
20 | 13 |
21 using base::Time; | 14 using base::Time; |
22 using base::TimeDelta; | 15 using base::TimeDelta; |
23 | 16 |
24 namespace { | 17 namespace { |
25 | 18 |
26 const wchar_t kDocRoot[] = L"chrome/test/data"; | 19 const wchar_t kDocRoot[] = L"chrome/test/data"; |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // (main) thread will do the IO, and when the fetch is complete it will | 463 // (main) thread will do the IO, and when the fetch is complete it will |
471 // terminate the main thread's message loop; then the other thread's | 464 // terminate the main thread's message loop; then the other thread's |
472 // message loop will be shut down automatically as the thread goes out of | 465 // message loop will be shut down automatically as the thread goes out of |
473 // scope. | 466 // scope. |
474 base::Thread t("URLFetcher test thread"); | 467 base::Thread t("URLFetcher test thread"); |
475 t.Start(); | 468 t.Start(); |
476 t.message_loop()->PostTask(FROM_HERE, new FetcherWrapperTask(this, url)); | 469 t.message_loop()->PostTask(FROM_HERE, new FetcherWrapperTask(this, url)); |
477 | 470 |
478 MessageLoop::current()->Run(); | 471 MessageLoop::current()->Run(); |
479 } | 472 } |
OLD | NEW |