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

Unified Diff: webkit/plugins/npapi/test/plugin_thread_async_call_test.cc

Issue 6334050: Re-enable the test that I disabled last night. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 | « webkit/plugins/npapi/test/plugin_thread_async_call_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/test/plugin_thread_async_call_test.cc
===================================================================
--- webkit/plugins/npapi/test/plugin_thread_async_call_test.cc (revision 73412)
+++ webkit/plugins/npapi/test/plugin_thread_async_call_test.cc (working copy)
@@ -2,9 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#define UNIT_TEST // To get the ShadowingAtExitManager.
+#include "base/at_exit.h"
+
#include "webkit/plugins/npapi/test/plugin_thread_async_call_test.h"
-#include "base/at_exit.h"
#include "base/message_loop.h"
#include "base/threading/thread.h"
#include "webkit/plugins/npapi/test/plugin_client.h"
@@ -47,9 +49,13 @@
PluginThreadAsyncCallTest::PluginThreadAsyncCallTest(
NPP id, NPNetscapeFuncs *host_functions)
- : PluginTest(id, host_functions) {
+ : PluginTest(id, host_functions), at_exit_manager_(NULL) {
}
+PluginThreadAsyncCallTest::~PluginThreadAsyncCallTest() {
+ delete at_exit_manager_;
+}
+
NPError PluginThreadAsyncCallTest::New(
uint16 mode, int16 argc, const char* argn[], const char* argv[],
NPSavedData* saved) {
@@ -71,7 +77,10 @@
// Schedule an async call that will succeed. Make sure to call that API from
// a different thread to fully test it.
if (this == g_short_lived_instance) {
- at_exit_manager_.reset(new base::AtExitManager());
+ // This is slightly complicated thanks to the Linux shared library build,
+ // which shares more compilation units between the NPAPI plug-in and
+ // the base code.
+ at_exit_manager_ = new base::ShadowingAtExitManager();
base::Thread random_thread("random_thread");
random_thread.Start();
random_thread.message_loop()->PostTask(FROM_HERE, new AsyncCallTask(this));
« no previous file with comments | « webkit/plugins/npapi/test/plugin_thread_async_call_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698