| 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");
|
|
|