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

Side by Side Diff: content/renderer/pepper/pepper_url_request_unittest.cc

Issue 918433002: Revert of PPAPI: Make tests that disable the proxy lock re-enable it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
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/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "content/public/common/user_agent.h" 6 #include "content/public/common/user_agent.h"
7 #include "content/public/test/render_view_test.h" 7 #include "content/public/test/render_view_test.h"
8 #include "content/renderer/pepper/url_request_info_util.h" 8 #include "content/renderer/pepper/url_request_info_util.h"
9 #include "ppapi/proxy/connection.h" 9 #include "ppapi/proxy/connection.h"
10 #include "ppapi/proxy/url_request_info_resource.h" 10 #include "ppapi/proxy/url_request_info_resource.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 test_globals_.GetResourceTracker()->DidCreateInstance(pp_instance_); 64 test_globals_.GetResourceTracker()->DidCreateInstance(pp_instance_);
65 65
66 // This resource doesn't do IPC, so a null connection is fine. 66 // This resource doesn't do IPC, so a null connection is fine.
67 info_ = new URLRequestInfoResource( 67 info_ = new URLRequestInfoResource(
68 ppapi::proxy::Connection(), pp_instance_, URLRequestInfoData()); 68 ppapi::proxy::Connection(), pp_instance_, URLRequestInfoData());
69 } 69 }
70 70
71 void TearDown() override { 71 void TearDown() override {
72 test_globals_.GetResourceTracker()->DidDeleteInstance(pp_instance_); 72 test_globals_.GetResourceTracker()->DidDeleteInstance(pp_instance_);
73 // Turn locking back to the default for tests that run later.
74 ppapi::ProxyLock::EnableLockingOnThreadForTest();
75 RenderViewTest::TearDown(); 73 RenderViewTest::TearDown();
76 } 74 }
77 75
78 bool GetDownloadToFile() { 76 bool GetDownloadToFile() {
79 WebURLRequest web_request; 77 WebURLRequest web_request;
80 URLRequestInfoData data = info_->GetData(); 78 URLRequestInfoData data = info_->GetData();
81 if (!CreateWebURLRequest(pp_instance_, &data, GetMainFrame(), &web_request)) 79 if (!CreateWebURLRequest(pp_instance_, &data, GetMainFrame(), &web_request))
82 return false; 80 return false;
83 return web_request.downloadToFile(); 81 return web_request.downloadToFile();
84 } 82 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 // Test that we can set multiple header fields using \n delimiter. 233 // Test that we can set multiple header fields using \n delimiter.
236 EXPECT_TRUE( 234 EXPECT_TRUE(
237 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz")); 235 SetStringProperty(PP_URLREQUESTPROPERTY_HEADERS, "foo: bar\nbar: baz"));
238 EXPECT_TRUE(IsExpected(GetHeaderValue("foo"), "bar")); 236 EXPECT_TRUE(IsExpected(GetHeaderValue("foo"), "bar"));
239 EXPECT_TRUE(IsExpected(GetHeaderValue("bar"), "baz")); 237 EXPECT_TRUE(IsExpected(GetHeaderValue("bar"), "baz"));
240 } 238 }
241 239
242 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody. 240 // TODO(bbudge) Unit tests for AppendDataToBody, AppendFileToBody.
243 241
244 } // namespace content 242 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_file_chooser_host_unittest.cc ('k') | ppapi/proxy/ppapi_proxy_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698