Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Side by Side Diff: chrome/browser/chrome_plugin_unittest.cc

Issue 1837003: Created a stock implementation of the MessageLoopProxy interface than can be ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Rearranged header files Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/thread.cc ('k') | chrome/browser/chrome_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Tests exercising the Chrome Plugin API. 4 // Tests exercising the Chrome Plugin API.
5 5
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/message_loop_proxy.h" 7 #include "base/message_loop_proxy.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "chrome/browser/chrome_plugin_host.h" 10 #include "chrome/browser/chrome_plugin_host.h"
(...skipping 14 matching lines...) Expand all
25 const char kPluginFilename[] = "test_chrome_plugin.dll"; 25 const char kPluginFilename[] = "test_chrome_plugin.dll";
26 const int kResponseBufferSize = 4096; 26 const int kResponseBufferSize = 4096;
27 27
28 class TestURLRequestContextGetter : public URLRequestContextGetter { 28 class TestURLRequestContextGetter : public URLRequestContextGetter {
29 public: 29 public:
30 virtual URLRequestContext* GetURLRequestContext() { 30 virtual URLRequestContext* GetURLRequestContext() {
31 if (!context_) 31 if (!context_)
32 context_ = new TestURLRequestContext(); 32 context_ = new TestURLRequestContext();
33 return context_; 33 return context_;
34 } 34 }
35 virtual scoped_refptr<MessageLoopProxy> GetIOMessageLoopProxy() { 35 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() {
36 return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO); 36 return ChromeThread::GetMessageLoopProxyForThread(ChromeThread::IO);
37 } 37 }
38 38
39 private: 39 private:
40 ~TestURLRequestContextGetter() {} 40 ~TestURLRequestContextGetter() {}
41 scoped_refptr<URLRequestContext> context_; 41 scoped_refptr<URLRequestContext> context_;
42 }; 42 };
43 43
44 class ChromePluginTest : public testing::Test, public URLRequest::Delegate { 44 class ChromePluginTest : public testing::Test, public URLRequest::Delegate {
45 public: 45 public:
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 TEST_F(ChromePluginTest, DoesNotInterceptOwnRequest) { 297 TEST_F(ChromePluginTest, DoesNotInterceptOwnRequest) {
298 const TestResponsePayload& payload = kChromeTestPluginPayloads[0]; 298 const TestResponsePayload& payload = kChromeTestPluginPayloads[0];
299 299
300 EXPECT_EQ(CPERR_SUCCESS, test_funcs_.test_make_request( 300 EXPECT_EQ(CPERR_SUCCESS, test_funcs_.test_make_request(
301 "GET", GURL(payload.url))); 301 "GET", GURL(payload.url)));
302 302
303 MessageLoop::current()->Run(); 303 MessageLoop::current()->Run();
304 } 304 }
305 305
306 } // namespace 306 } // namespace
OLDNEW
« no previous file with comments | « base/thread.cc ('k') | chrome/browser/chrome_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698