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

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

Issue 5482002: Fix a ui test result since numbers are now doubles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/webkit/glue/plugins/test
Patch Set: test_shell_tests 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 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)
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 std::string script = "javascript:GetMagicNumber()"; 83 std::string script = "javascript:GetMagicNumber()";
84 NPString script_string; 84 NPString script_string;
85 script_string.UTF8Characters = script.c_str(); 85 script_string.UTF8Characters = script.c_str();
86 script_string.UTF8Length = 86 script_string.UTF8Length =
87 static_cast<unsigned int>(script.length()); 87 static_cast<unsigned int>(script.length());
88 88
89 NPVariant result_var; 89 NPVariant result_var;
90 bool result = HostFunctions()->evaluate( 90 bool result = HostFunctions()->evaluate(
91 id(), window_obj, &script_string, &result_var); 91 id(), window_obj, &script_string, &result_var);
92 if (!result || 92 if (!result ||
93 result_var.type != NPVariantType_Int32 || 93 result_var.type != NPVariantType_Double ||
94 result_var.value.intValue != 42) { 94 result_var.value.doubleValue != 42.0) {
95 SetError("Failed to script during NPP_Destroy"); 95 SetError("Failed to script during NPP_Destroy");
96 } 96 }
97 } 97 }
98 98
99 SignalTestCompleted(); 99 SignalTestCompleted();
100 return NPERR_NO_ERROR; 100 return NPERR_NO_ERROR;
101 } 101 }
102 102
103 void WindowedPluginTest::CallJSFunction( 103 void WindowedPluginTest::CallJSFunction(
104 WindowedPluginTest* this_ptr, const char* function) { 104 WindowedPluginTest* this_ptr, const char* function) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 if (this_ptr->done_) { 142 if (this_ptr->done_) {
143 ::RemoveProp(window, L"Plugin_Instance"); 143 ::RemoveProp(window, L"Plugin_Instance");
144 } 144 }
145 } 145 }
146 146
147 return DefWindowProc(window, message, wparam, lparam); 147 return DefWindowProc(window, message, wparam, lparam);
148 } 148 }
149 149
150 } // namespace NPAPIClient 150 } // namespace NPAPIClient
OLDNEW
« chrome/test/ui/npapi_uitest.cc ('K') | « webkit/glue/cpp_bound_class_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698