| OLD | NEW |
| 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 Loading... |
| 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_mode != private_expected) | 44 if (private_expected != 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 |
| OLD | NEW |