diff options
author | chase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 00:23:26 +0000 |
---|---|---|
committer | chase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 00:23:26 +0000 |
commit | c85b0ba71b5a55647b01de9d345e46896979033d (patch) | |
tree | ae99657ca1440b7540da473e1bbe6156e43e9be3 /webkit/plugins/npapi/test/plugin_private_test.cc | |
parent | 887ba3adc7b32b7df315ef292ae9395fd75653e5 (diff) | |
download | chromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.zip chromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.tar.gz chromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.tar.bz2 |
Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi"
Manually reverting r69755, which broke the tree.
BUG=none
TEST=none
TBR=dmaclach@chromium.org
Review URL: http://codereview.chromium.org/5998002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins/npapi/test/plugin_private_test.cc')
-rw-r--r-- | webkit/plugins/npapi/test/plugin_private_test.cc | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/webkit/plugins/npapi/test/plugin_private_test.cc b/webkit/plugins/npapi/test/plugin_private_test.cc deleted file mode 100644 index b3aabce..0000000 --- a/webkit/plugins/npapi/test/plugin_private_test.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "webkit/plugins/npapi/test/plugin_private_test.h" - -#include "base/basictypes.h" -#include "base/string_util.h" -#include "webkit/plugins/npapi/test/plugin_client.h" - -namespace NPAPIClient { - -PrivateTest::PrivateTest(NPP id, NPNetscapeFuncs *host_functions) - : PluginTest(id, host_functions) { -} - -NPError PrivateTest::New(uint16 mode, int16 argc, - const char* argn[], const char* argv[], - NPSavedData* saved) { - PluginTest::New(mode, argc, argn, argv, saved); - - NPBool private_mode = 0; - NPNetscapeFuncs* browser = NPAPIClient::PluginClient::HostFunctions(); - NPError result = browser->getvalue( - id(), NPNVprivateModeBool, &private_mode); - if (result != NPERR_NO_ERROR) { - SetError("Failed to read NPNVprivateModeBool value."); - } else { - NPIdentifier location = HostFunctions()->getstringidentifier("location"); - NPIdentifier href = HostFunctions()->getstringidentifier("href"); - - NPObject *window_obj = NULL; - HostFunctions()->getvalue(id(), NPNVWindowNPObject, &window_obj); - - NPVariant location_var; - HostFunctions()->getproperty(id(), window_obj, location, &location_var); - - NPVariant href_var; - HostFunctions()->getproperty(id(), NPVARIANT_TO_OBJECT(location_var), href, - &href_var); - std::string href_str(href_var.value.stringValue.UTF8Characters, - href_var.value.stringValue.UTF8Length); - bool private_expected = href_str.find("?private") != href_str.npos; - if (private_mode != static_cast<NPBool>(private_expected)) - SetError("NPNVprivateModeBool returned incorrect value."); - - HostFunctions()->releasevariantvalue(&href_var); - HostFunctions()->releasevariantvalue(&location_var); - HostFunctions()->releaseobject(window_obj); - } - - SignalTestCompleted(); - - return NPERR_NO_ERROR; -} - -} // namespace NPAPIClient |