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

Unified Diff: webkit/glue/plugins/test/plugin_window_size_test.cc

Issue 6012002: Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years 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/glue/plugins/test/plugin_window_size_test.h ('k') | webkit/glue/plugins/test/plugin_windowed_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/plugins/test/plugin_window_size_test.cc
===================================================================
--- webkit/glue/plugins/test/plugin_window_size_test.cc (revision 69426)
+++ webkit/glue/plugins/test/plugin_window_size_test.cc (working copy)
@@ -1,55 +0,0 @@
-// Copyright (c) 2006-2008 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 "webkit/glue/plugins/test/plugin_window_size_test.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
-
-namespace NPAPIClient {
-
-PluginWindowSizeTest::PluginWindowSizeTest(NPP id,
- NPNetscapeFuncs *host_functions)
- : PluginTest(id, host_functions) {
-}
-
-NPError PluginWindowSizeTest::SetWindow(NPWindow* pNPWindow) {
- if (pNPWindow->window == NULL)
- return NPERR_NO_ERROR;
-
- HWND window = reinterpret_cast<HWND>(pNPWindow->window);
- if (!pNPWindow || !::IsWindow(window)) {
- SetError("Invalid arguments passed in");
- return NPERR_INVALID_PARAM;
- }
-
- RECT window_rect = {0};
- window_rect.left = pNPWindow->x;
- window_rect.top = pNPWindow->y;
- window_rect.right = pNPWindow->width;
- window_rect.bottom = pNPWindow->height;
-
- if (!::IsRectEmpty(&window_rect)) {
- RECT client_rect = {0};
- ::GetClientRect(window, &client_rect);
- if (::IsRectEmpty(&client_rect)) {
- SetError("The client rect of the plugin window is empty. Test failed");
- }
-
- // Bug 6742: ensure that the coordinates passed in are relative to the
- // parent HWND.
- POINT origin_from_os;
- RECT window_rect_from_os;
- ::GetWindowRect(window, &window_rect_from_os);
- origin_from_os.x = window_rect_from_os.left;
- origin_from_os.y = window_rect_from_os.top;
- ::ScreenToClient(GetParent(window), &origin_from_os);
- if (origin_from_os.x != pNPWindow->x || origin_from_os.y != pNPWindow->y)
- SetError("Wrong position passed in to SetWindow! Test failed");
-
- SignalTestCompleted();
- }
-
- return NPERR_NO_ERROR;
-}
-
-} // namespace NPAPIClient
« no previous file with comments | « webkit/glue/plugins/test/plugin_window_size_test.h ('k') | webkit/glue/plugins/test/plugin_windowed_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698