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

Side by Side Diff: webkit/glue/plugins/test/plugin_private_test.cc

Issue 149270: Relanding r20046. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | « no previous file | no next file » | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "webkit/glue/plugins/test/plugin_private_test.h" 5 #include "webkit/glue/plugins/test/plugin_private_test.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "webkit/glue/plugins/test/plugin_client.h" 9 #include "webkit/glue/plugins/test/plugin_client.h"
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 NPVariant location_var; 35 NPVariant location_var;
36 HostFunctions()->getproperty(id(), window_obj, location, &location_var); 36 HostFunctions()->getproperty(id(), window_obj, location, &location_var);
37 37
38 NPVariant href_var; 38 NPVariant href_var;
39 HostFunctions()->getproperty(id(), NPVARIANT_TO_OBJECT(location_var), href, 39 HostFunctions()->getproperty(id(), NPVARIANT_TO_OBJECT(location_var), href,
40 &href_var); 40 &href_var);
41 std::string href_str(href_var.value.stringValue.UTF8Characters, 41 std::string href_str(href_var.value.stringValue.UTF8Characters,
42 href_var.value.stringValue.UTF8Length); 42 href_var.value.stringValue.UTF8Length);
43 bool private_expected = href_str.find("?private") != href_str.npos; 43 bool private_expected = href_str.find("?private") != href_str.npos;
44 if (private_expected != private_expected) 44 if (private_mode != static_cast<NPBool>(private_expected))
45 SetError("NPNVprivateModeBool returned incorrect value."); 45 SetError("NPNVprivateModeBool returned incorrect value.");
46 46
47 HostFunctions()->releasevariantvalue(&href_var); 47 HostFunctions()->releasevariantvalue(&href_var);
48 HostFunctions()->releasevariantvalue(&location_var); 48 HostFunctions()->releasevariantvalue(&location_var);
49 HostFunctions()->releaseobject(window_obj); 49 HostFunctions()->releaseobject(window_obj);
50 } 50 }
51 51
52 SignalTestCompleted(); 52 SignalTestCompleted();
53 53
54 return NPERR_NO_ERROR; 54 return NPERR_NO_ERROR;
55 } 55 }
56 56
57 } // namespace NPAPIClient 57 } // namespace NPAPIClient
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698