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

Unified Diff: content/test/plugin/plugin_private_test.cc

Issue 1182303010: Delete the NPAPI plugin browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/plugin/plugin_private_test.h ('k') | content/test/plugin/plugin_request_read_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/plugin/plugin_private_test.cc
diff --git a/content/test/plugin/plugin_private_test.cc b/content/test/plugin/plugin_private_test.cc
deleted file mode 100644
index 22b1a3352e0644c4066ed76cc566eda8dc375c4f..0000000000000000000000000000000000000000
--- a/content/test/plugin/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 "content/test/plugin/plugin_private_test.h"
-
-#include "base/basictypes.h"
-#include "base/strings/string_util.h"
-#include "content/test/plugin/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
« no previous file with comments | « content/test/plugin/plugin_private_test.h ('k') | content/test/plugin/plugin_request_read_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698