OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |