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

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

Issue 5967003: Refactor UITestBase/ProxyLauncher. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Add POD struct to hold some launcher variables. Created 9 years, 11 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
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 "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "chrome/common/chrome_paths.h" 9 #include "chrome/common/chrome_paths.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 TEST_F(LayoutPluginTester, FLAKY_SelfDeletePluginInvoke) { 61 TEST_F(LayoutPluginTester, FLAKY_SelfDeletePluginInvoke) {
62 const FilePath test_case(FILE_PATH_LITERAL("self_delete_plugin_invoke.html")); 62 const FilePath test_case(FILE_PATH_LITERAL("self_delete_plugin_invoke.html"));
63 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); 63 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case);
64 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); 64 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
65 WaitForFinish("self_delete_plugin_invoke", "1", url, 65 WaitForFinish("self_delete_plugin_invoke", "1", url,
66 kTestCompleteCookie, kTestCompleteSuccess, 66 kTestCompleteCookie, kTestCompleteSuccess,
67 action_max_timeout_ms()); 67 action_max_timeout_ms());
68 } 68 }
69 69
70 TEST_F(LayoutPluginTester, NPObjectReleasedOnDestruction) { 70 TEST_F(LayoutPluginTester, NPObjectReleasedOnDestruction) {
71 if (UITest::in_process_renderer()) 71 if (ProxyLauncher::in_process_renderer())
72 return; 72 return;
73 73
74 const FilePath test_case( 74 const FilePath test_case(
75 FILE_PATH_LITERAL("npobject_released_on_destruction.html")); 75 FILE_PATH_LITERAL("npobject_released_on_destruction.html"));
76 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); 76 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case);
77 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); 77 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
78 78
79 scoped_refptr<BrowserProxy> window_proxy(automation()->GetBrowserWindow(0)); 79 scoped_refptr<BrowserProxy> window_proxy(automation()->GetBrowserWindow(0));
80 ASSERT_TRUE(window_proxy); 80 ASSERT_TRUE(window_proxy);
81 ASSERT_TRUE(window_proxy->AppendTab(GURL(chrome::kAboutBlankURL))); 81 ASSERT_TRUE(window_proxy->AppendTab(GURL(chrome::kAboutBlankURL)));
82 82
83 scoped_refptr<TabProxy> tab_proxy(window_proxy->GetTab(0)); 83 scoped_refptr<TabProxy> tab_proxy(window_proxy->GetTab(0));
84 ASSERT_TRUE(tab_proxy.get()); 84 ASSERT_TRUE(tab_proxy.get());
85 ASSERT_TRUE(tab_proxy->Close(true)); 85 ASSERT_TRUE(tab_proxy->Close(true));
86 } 86 }
87 87
88 // Test that a dialog is properly created when a plugin throws an 88 // Test that a dialog is properly created when a plugin throws an
89 // exception. Should be run for in and out of process plugins, but 89 // exception. Should be run for in and out of process plugins, but
90 // the more interesting case is out of process, where we must route 90 // the more interesting case is out of process, where we must route
91 // the exception to the correct renderer. 91 // the exception to the correct renderer.
92 TEST_F(LayoutPluginTester, NPObjectSetException) { 92 TEST_F(LayoutPluginTester, NPObjectSetException) {
93 const FilePath test_case(FILE_PATH_LITERAL("npobject_set_exception.html")); 93 const FilePath test_case(FILE_PATH_LITERAL("npobject_set_exception.html"));
94 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case); 94 GURL url = ui_test_utils::GetTestUrl(FilePath(kTestDir), test_case);
95 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url)); 95 ASSERT_NO_FATAL_FAILURE(NavigateToURL(url));
96 WaitForFinish("npobject_set_exception", "1", url, 96 WaitForFinish("npobject_set_exception", "1", url,
97 kTestCompleteCookie, kTestCompleteSuccess, 97 kTestCompleteCookie, kTestCompleteSuccess,
98 action_max_timeout_ms()); 98 action_max_timeout_ms());
99 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698