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

Side by Side Diff: webkit/tools/test_shell/plugin_tests.cc

Issue 9232042: Mark PluginTest.PluginVisibilty as FAILS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <string> 5 #include <string>
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if (*plugin_hwnd) { 159 if (*plugin_hwnd) {
160 // More than one child window found, unexpected. 160 // More than one child window found, unexpected.
161 plugin_hwnd = NULL; 161 plugin_hwnd = NULL;
162 return FALSE; 162 return FALSE;
163 } 163 }
164 *plugin_hwnd = hwnd; 164 *plugin_hwnd = hwnd;
165 return TRUE; 165 return TRUE;
166 } 166 }
167 167
168 // Tests that hiding/showing the parent frame hides/shows the plugin. 168 // Tests that hiding/showing the parent frame hides/shows the plugin.
169 TEST_F(PluginTest, PluginVisibilty) { 169 // Fails for WIN. http://crbug.com/111601
170 #if defined(OS_WIN)
171 #define MAYBE_PluginVisibilty FAILS_PluginVisibilty
172 #else
173 #define MAYBE_PluginVisibilty PluginVisibilty
174 #endif
175
176 TEST_F(PluginTest, MAYBE_PluginVisibilty) {
170 FilePath test_html = data_dir_; 177 FilePath test_html = data_dir_;
171 test_html = test_html.AppendASCII(kPluginsDir); 178 test_html = test_html.AppendASCII(kPluginsDir);
172 test_html = test_html.AppendASCII("plugin_visibility.html"); 179 test_html = test_html.AppendASCII("plugin_visibility.html");
173 test_shell_->LoadFile(test_html); 180 test_shell_->LoadFile(test_html);
174 test_shell_->WaitTestFinished(); 181 test_shell_->WaitTestFinished();
175 182
176 WebFrame* main_frame = test_shell_->webView()->mainFrame(); 183 WebFrame* main_frame = test_shell_->webView()->mainFrame();
177 HWND frame_hwnd = test_shell_->webViewWnd(); 184 HWND frame_hwnd = test_shell_->webViewWnd();
178 HWND plugin_hwnd = NULL; 185 HWND plugin_hwnd = NULL;
179 EnumChildWindows(frame_hwnd, EnumChildProc, 186 EnumChildWindows(frame_hwnd, EnumChildProc,
180 reinterpret_cast<LPARAM>(&plugin_hwnd)); 187 reinterpret_cast<LPARAM>(&plugin_hwnd));
181 ASSERT_TRUE(plugin_hwnd != NULL); 188 ASSERT_TRUE(plugin_hwnd != NULL);
182 ASSERT_FALSE(IsWindowVisible(plugin_hwnd)); 189 ASSERT_FALSE(IsWindowVisible(plugin_hwnd));
183 190
184 main_frame->executeScript(WebString::fromUTF8("showPlugin(true)")); 191 main_frame->executeScript(WebString::fromUTF8("showPlugin(true)"));
185 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); 192 ASSERT_TRUE(IsWindowVisible(plugin_hwnd));
186 193
187 main_frame->executeScript(WebString::fromUTF8("showFrame(false)")); 194 main_frame->executeScript(WebString::fromUTF8("showFrame(false)"));
188 ASSERT_FALSE(IsWindowVisible(plugin_hwnd)); 195 ASSERT_FALSE(IsWindowVisible(plugin_hwnd));
189 196
190 main_frame->executeScript(WebString::fromUTF8("showFrame(true)")); 197 main_frame->executeScript(WebString::fromUTF8("showFrame(true)"));
191 ASSERT_TRUE(IsWindowVisible(plugin_hwnd)); 198 ASSERT_TRUE(IsWindowVisible(plugin_hwnd));
192 } 199 }
193 #endif 200 #endif
194 #endif //!ARCH_CPU_64_BITS 201 #endif //!ARCH_CPU_64_BITS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698