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

Unified Diff: chrome/browser/browser_uitest.cc

Issue 211033: Automated ui test porting + cleanup:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: all green\! Created 11 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/browser_uitest.cc
===================================================================
--- chrome/browser/browser_uitest.cc (revision 26702)
+++ chrome/browser/browser_uitest.cc (working copy)
@@ -24,17 +24,6 @@
namespace {
class BrowserTest : public UITest {
- protected:
-#if defined(OS_WIN)
- HWND GetMainWindow() {
- scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
- scoped_refptr<WindowProxy> window(browser->GetWindow());
-
- HWND window_handle;
- EXPECT_TRUE(window->GetHWND(&window_handle));
- return window_handle;
- }
-#endif
};
class VisibleBrowserTest : public UITest {
@@ -53,10 +42,8 @@
NavigateToURL(net::FilePathToFileURL(test_file));
PlatformThread::Sleep(action_timeout_ms());
- // Simulate an end of session. Normally this happens when the user
- // shuts down the pc or logs off.
- HWND window_handle = GetMainWindow();
- ASSERT_TRUE(::PostMessageW(window_handle, WM_ENDSESSION, 0, 0));
+ scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(browser->TerminateSession());
PlatformThread::Sleep(action_timeout_ms());
ASSERT_FALSE(IsBrowserRunning());

Powered by Google App Engine
This is Rietveld 408576698