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

Side by Side Diff: webkit/tools/test_shell/plugin_tests.cc

Issue 13701: Use automatic memory management for URLRequestContext's members.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years 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
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 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 11 matching lines...) Expand all
22 22
23 static const char kTestCompleteCookie[] = "status"; 23 static const char kTestCompleteCookie[] = "status";
24 static const char kTestCompleteSuccess[] = "OK"; 24 static const char kTestCompleteSuccess[] = "OK";
25 25
26 // Provides functionality for creating plugin tests. 26 // Provides functionality for creating plugin tests.
27 class PluginTest : public TestShellTest { 27 class PluginTest : public TestShellTest {
28 // A basic URLRequestContext that only provides an in-memory cookie store. 28 // A basic URLRequestContext that only provides an in-memory cookie store.
29 class RequestContext : public TestURLRequestContext { 29 class RequestContext : public TestURLRequestContext {
30 public: 30 public:
31 RequestContext() { 31 RequestContext() {
32 cookie_store_ = new net::CookieMonster(); 32 cookie_store_.reset(new net::CookieMonster());
33 }
34
35 virtual ~RequestContext() {
36 delete cookie_store_;
37 } 33 }
38 }; 34 };
39 35
40 public: 36 public:
41 PluginTest() {} 37 PluginTest() {}
42 ~PluginTest() {} 38 ~PluginTest() {}
43 39
44 void NavigateToURL(const std::wstring& test_url) { 40 void NavigateToURL(const std::wstring& test_url) {
45 ASSERT_TRUE(file_util::PathExists(test_url)); 41 ASSERT_TRUE(file_util::PathExists(test_url));
46 test_url_ = net::FilePathToFileURL(test_url); 42 test_url_ = net::FilePathToFileURL(test_url);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 GURL test_url_; 110 GURL test_url_;
115 }; 111 };
116 112
117 TEST_F(PluginTest, DISABLED_VerifyPluginWindowRect) { 113 TEST_F(PluginTest, DISABLED_VerifyPluginWindowRect) {
118 std::wstring test_url = GetTestURL(plugin_data_dir_, 114 std::wstring test_url = GetTestURL(plugin_data_dir_,
119 L"verify_plugin_window_rect.html"); 115 L"verify_plugin_window_rect.html");
120 NavigateToURL(test_url); 116 NavigateToURL(test_url);
121 WaitForFinish("checkwindowrect", "1"); 117 WaitForFinish("checkwindowrect", "1");
122 } 118 }
123 119
OLDNEW
« no previous file with comments | « webkit/glue/plugins/mozilla_extensions.cc ('k') | webkit/tools/test_shell/test_shell_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698