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

Side by Side Diff: chrome/test/ui/npapi_uitest.cc

Issue 3539002: Add UI test for click-to-play. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: move message declaration to bottom of file Created 10 years, 2 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
« no previous file with comments | « chrome/test/plugin/plugin_test.cpp ('k') | webkit/glue/plugins/test/plugin_setup_test.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 // windows headers 8 // windows headers
9 #include <comutil.h> 9 #include <comutil.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 FilePath(FILE_PATH_LITERAL("npapi/convert_point.html")))); 388 FilePath(FILE_PATH_LITERAL("npapi/convert_point.html"))));
389 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); 389 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
390 390
391 // TODO(stuartmorgan): When the automation system supports sending clicks, 391 // TODO(stuartmorgan): When the automation system supports sending clicks,
392 // change the test to trigger on mouse-down rather than window focus. 392 // change the test to trigger on mouse-down rather than window focus.
393 ASSERT_TRUE(browser->BringToFront()); 393 ASSERT_TRUE(browser->BringToFront());
394 WaitForFinish("convert_point", "1", url, kTestCompleteCookie, 394 WaitForFinish("convert_point", "1", url, kTestCompleteCookie,
395 kTestCompleteSuccess, action_max_timeout_ms()); 395 kTestCompleteSuccess, action_max_timeout_ms());
396 } 396 }
397 #endif 397 #endif
398
399 TEST_F(NPAPIVisiblePluginTester, ClickToPlay) {
400 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
401 ASSERT_TRUE(browser.get());
402 ASSERT_TRUE(browser->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
403 CONTENT_SETTING_BLOCK));
404
405 GURL url(URLRequestMockHTTPJob::GetMockUrl(
406 FilePath(FILE_PATH_LITERAL("npapi/click_to_play.html"))));
407 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
408
409 scoped_refptr<TabProxy> tab(browser->GetTab(0));
410 ASSERT_TRUE(tab.get());
411
412 ASSERT_TRUE(tab->LoadBlockedPlugins());
413
414 WaitForFinish("setup", "1", url, kTestCompleteCookie,
415 kTestCompleteSuccess, action_max_timeout_ms());
416 }
OLDNEW
« no previous file with comments | « chrome/test/plugin/plugin_test.cpp ('k') | webkit/glue/plugins/test/plugin_setup_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698