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

Unified Diff: content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp

Issue 1852523003: Remove NPAPI test plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_last_plugin_layout_tests
Patch Set: fix isolate Created 4 years, 9 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
Index: content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp
diff --git a/content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp b/content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp
deleted file mode 100644
index ca6f28c24070bd404e08d1d779b3a345acaa5cc5..0000000000000000000000000000000000000000
--- a/content/shell/tools/plugin/Tests/LeakWindowScriptableObject.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2014 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 <stdint.h>
-
-#include "PluginTest.h"
-
-using namespace std;
-
-class LeakWindowScriptableObject : public PluginTest {
-public:
- LeakWindowScriptableObject(NPP npp, const string& identifier)
- : PluginTest(npp, identifier)
- {
- }
-
-private:
- NPError NPP_New(NPMIMEType pluginType,
- uint16_t mode,
- int16_t argc,
- char* argn[],
- char* argv[],
- NPSavedData* saved) override {
- // Get a new reference to the window script object.
- NPObject* window;
- if (NPN_GetValue(NPNVWindowNPObject, &window) != NPERR_NO_ERROR) {
- log("Fail: Cannot fetch window script object");
- return NPERR_NO_ERROR;
- }
-
- // Get another reference to the same object via window.self.
- NPIdentifier self_name = NPN_GetStringIdentifier("self");
- NPVariant window_self_variant;
- if (!NPN_GetProperty(window, self_name, &window_self_variant)) {
- log("Fail: Cannot query window.self");
- return NPERR_NO_ERROR;
- }
- if (!NPVARIANT_IS_OBJECT(window_self_variant)) {
- log("Fail: window.self is not an object");
- return NPERR_NO_ERROR;
- }
-
- // Leak both references to the window script object.
- return NPERR_NO_ERROR;
- }
-};
-
-static PluginTest::Register<LeakWindowScriptableObject> leakWindowScriptableObject("leak-window-scriptable-object");

Powered by Google App Engine
This is Rietveld 408576698