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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_browsertest.cc

Issue 10700117: Replaced static URLRequestFileJob factory with non-static protocol handler for File jobs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed merge Created 8 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
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/renderer/browser_plugin/browser_plugin_browsertest.h" 5 #include "content/renderer/browser_plugin/browser_plugin_browsertest.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "content/common/browser_plugin_messages.h" 10 #include "content/common/browser_plugin_messages.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 ASSERT_TRUE(msg); 80 ASSERT_TRUE(msg);
81 PickleIterator iter = IPC::SyncMessage::GetDataIterator(msg); 81 PickleIterator iter = IPC::SyncMessage::GetDataIterator(msg);
82 BrowserPluginHostMsg_ResizeGuest::SendParam resize_params; 82 BrowserPluginHostMsg_ResizeGuest::SendParam resize_params;
83 ASSERT_TRUE(IPC::ReadParam(msg, &iter, &resize_params)); 83 ASSERT_TRUE(IPC::ReadParam(msg, &iter, &resize_params));
84 int instance_id = resize_params.a; 84 int instance_id = resize_params.a;
85 BrowserPluginHostMsg_ResizeGuest_Params params(resize_params.b); 85 BrowserPluginHostMsg_ResizeGuest_Params params(resize_params.b);
86 EXPECT_EQ(640, params.width); 86 EXPECT_EQ(640, params.width);
87 EXPECT_EQ(480, params.height); 87 EXPECT_EQ(480, params.height);
88 // Verify that the browser plugin wasn't already waiting on a resize when this 88 // Verify that the browser plugin wasn't already waiting on a resize when this
89 // resize happened. 89 // resize happened.
90 EXPECT_FALSE(params.resize_pending); 90 EXPECT_EQ(false, params.resize_pending);
mmenke 2012/08/15 14:57:16 Why this change? Doesn't seem to belong in this C
shalev 2012/08/15 21:23:41 Oops, this change is not supposed to be here (it w
91 91
92 MockBrowserPlugin* browser_plugin = 92 MockBrowserPlugin* browser_plugin =
93 static_cast<MockBrowserPlugin*>( 93 static_cast<MockBrowserPlugin*>(
94 browser_plugin_manager()->GetBrowserPlugin(instance_id)); 94 browser_plugin_manager()->GetBrowserPlugin(instance_id));
95 ASSERT_TRUE(browser_plugin); 95 ASSERT_TRUE(browser_plugin);
96 // Now the browser plugin is expecting a UpdateRect resize. 96 // Now the browser plugin is expecting a UpdateRect resize.
97 EXPECT_TRUE(browser_plugin->resize_pending_); 97 EXPECT_TRUE(browser_plugin->resize_pending_);
98 98
99 // Send the BrowserPlugin an UpdateRect equal to its container size. 99 // Send the BrowserPlugin an UpdateRect equal to its container size.
100 // That should clear the resize_pending_ flag. 100 // That should clear the resize_pending_ flag.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 EXPECT_EQ(kGoogleURL, ExecuteScriptAndReturnString("url")); 313 EXPECT_EQ(kGoogleURL, ExecuteScriptAndReturnString("url"));
314 314
315 ExecuteJavaScript(kRemoveEventListener); 315 ExecuteJavaScript(kRemoveEventListener);
316 browser_plugin->DidNavigate(GURL(kGoogleNewsURL)); 316 browser_plugin->DidNavigate(GURL(kGoogleNewsURL));
317 // The URL variable should not change because we've removed the event 317 // The URL variable should not change because we've removed the event
318 // listener. 318 // listener.
319 EXPECT_EQ(kGoogleURL, ExecuteScriptAndReturnString("url")); 319 EXPECT_EQ(kGoogleURL, ExecuteScriptAndReturnString("url"));
320 } 320 }
321 321
322 } // namespace content 322 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698