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

Side by Side Diff: webkit/glue/plugins/test/plugin_windowed_test.cc

Issue 1073003: Added a test for pepper3d. It ensures that we can successfully load a pepper ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/glue/plugins/test/plugin_windowed_test.h" 5 #include "webkit/glue/plugins/test/plugin_windowed_test.h"
6 #include "webkit/glue/plugins/test/plugin_client.h" 6 #include "webkit/glue/plugins/test/plugin_client.h"
7 7
8 namespace NPAPIClient { 8 namespace NPAPIClient {
9 9
10 WindowedPluginTest::WindowedPluginTest(NPP id, NPNetscapeFuncs *host_functions) 10 WindowedPluginTest::WindowedPluginTest(NPP id, NPNetscapeFuncs *host_functions)
11 : PluginTest(id, host_functions), 11 : PluginTest(id, host_functions),
12 window_(NULL), done_(false) { 12 window_(NULL), done_(false) {
13 } 13 }
14 14
15 WindowedPluginTest::~WindowedPluginTest() { 15 WindowedPluginTest::~WindowedPluginTest() {
16 if (window_) 16 if (window_)
17 DestroyWindow(window_); 17 DestroyWindow(window_);
18 } 18 }
19 19
20 NPError WindowedPluginTest::SetWindow(NPWindow* pNPWindow) { 20 NPError WindowedPluginTest::SetWindow(NPWindow* pNPWindow) {
21 if (pNPWindow->window == NULL)
22 return NPERR_NO_ERROR;
23
21 if (test_name() == "create_instance_in_paint" && test_id() == "2") { 24 if (test_name() == "create_instance_in_paint" && test_id() == "2") {
22 SignalTestCompleted(); 25 SignalTestCompleted();
23 return NPERR_NO_ERROR; 26 return NPERR_NO_ERROR;
24 } 27 }
25 28
26 if (window_) 29 if (window_)
27 return NPERR_NO_ERROR; 30 return NPERR_NO_ERROR;
28 31
29 HWND parent = reinterpret_cast<HWND>(pNPWindow->window); 32 HWND parent = reinterpret_cast<HWND>(pNPWindow->window);
30 if (!pNPWindow || !::IsWindow(parent)) { 33 if (!pNPWindow || !::IsWindow(parent)) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // and verify that we don't hang the browser. 130 // and verify that we don't hang the browser.
128 CallJSFunction(this_ptr, "CallAlert"); 131 CallJSFunction(this_ptr, "CallAlert");
129 CallJSFunction(this_ptr, "CallAlert"); 132 CallJSFunction(this_ptr, "CallAlert");
130 } 133 }
131 } 134 }
132 135
133 return DefWindowProc(window, message, wparam, lparam); 136 return DefWindowProc(window, message, wparam, lparam);
134 } 137 }
135 138
136 } // namespace NPAPIClient 139 } // namespace NPAPIClient
OLDNEW
« no previous file with comments | « webkit/glue/plugins/test/plugin_window_size_test.cc ('k') | webkit/glue/plugins/test/plugin_windowless_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698