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

Side by Side Diff: content/test/ppapi_unittest.cc

Issue 451923002: Add a X-Requested-With header to URL requests for PPAPI Flash (only). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment about -1. Created 6 years, 4 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 | « content/renderer/render_frame_impl.cc ('k') | ppapi/tests/test_url_loader.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) 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 "content/test/ppapi_unittest.h" 5 #include "content/test/ppapi_unittest.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "content/renderer/pepper/gfx_conversion.h" 8 #include "content/renderer/pepper/gfx_conversion.h"
9 #include "content/renderer/pepper/host_globals.h" 9 #include "content/renderer/pepper/host_globals.h"
10 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 10 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 PpapiUnittest::~PpapiUnittest() { 72 PpapiUnittest::~PpapiUnittest() {
73 DCHECK(current_unittest == this); 73 DCHECK(current_unittest == this);
74 current_unittest = NULL; 74 current_unittest = NULL;
75 } 75 }
76 76
77 void PpapiUnittest::SetUp() { 77 void PpapiUnittest::SetUp() {
78 message_loop_.reset(new base::MessageLoop()); 78 message_loop_.reset(new base::MessageLoop());
79 79
80 // Initialize the mock module. 80 // Initialize the mock module.
81 module_ = new PluginModule("Mock plugin", base::FilePath(), 81 module_ = new PluginModule("Mock plugin", "1.0", base::FilePath(),
82 ppapi::PpapiPermissions()); 82 ppapi::PpapiPermissions());
83 ppapi::PpapiGlobals::Get()->ResetMainThreadMessageLoopForTesting(); 83 ppapi::PpapiGlobals::Get()->ResetMainThreadMessageLoopForTesting();
84 PepperPluginInfo::EntryPoints entry_points; 84 PepperPluginInfo::EntryPoints entry_points;
85 entry_points.get_interface = &MockGetInterface; 85 entry_points.get_interface = &MockGetInterface;
86 entry_points.initialize_module = &MockInitializeModule; 86 entry_points.initialize_module = &MockInitializeModule;
87 ASSERT_TRUE(module_->InitAsInternalPlugin(entry_points)); 87 ASSERT_TRUE(module_->InitAsInternalPlugin(entry_points));
88 88
89 // Initialize the mock instance. 89 // Initialize the mock instance.
90 instance_ = PepperPluginInstanceImpl::Create(NULL, module(), NULL, GURL()); 90 instance_ = PepperPluginInstanceImpl::Create(NULL, module(), NULL, GURL());
91 } 91 }
(...skipping 17 matching lines...) Expand all
109 DCHECK(module_->HasOneRef()); 109 DCHECK(module_->HasOneRef());
110 module_ = NULL; 110 module_ = NULL;
111 } 111 }
112 112
113 void PpapiUnittest::SetViewSize(int width, int height) const { 113 void PpapiUnittest::SetViewSize(int width, int height) const {
114 instance_->view_data_.rect = PP_FromGfxRect(gfx::Rect(0, 0, width, height)); 114 instance_->view_data_.rect = PP_FromGfxRect(gfx::Rect(0, 0, width, height));
115 instance_->view_data_.clip_rect = instance_->view_data_.rect; 115 instance_->view_data_.clip_rect = instance_->view_data_.rect;
116 } 116 }
117 117
118 } // namespace content 118 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | ppapi/tests/test_url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698