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

Side by Side Diff: chrome/browser/ui/tests/browser_uitest.cc

Issue 9702055: Automated tests for full screen & mouse lock M16 features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FileURL & BrowserTest compilation fixes Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/test/automation/window_proxy.h" 21 #include "chrome/test/automation/window_proxy.h"
22 #include "chrome/test/ui/ui_test.h" 22 #include "chrome/test/ui/ui_test.h"
23 #include "grit/chromium_strings.h" 23 #include "grit/chromium_strings.h"
24 #include "grit/generated_resources.h" 24 #include "grit/generated_resources.h"
25 #include "net/base/net_util.h" 25 #include "net/base/net_util.h"
26 #include "net/test/test_server.h" 26 #include "net/test/test_server.h"
27 #include "ui/gfx/native_widget_types.h" 27 #include "ui/gfx/native_widget_types.h"
28 28
29 namespace { 29 namespace {
30 30
31 class BrowserTest : public UITest {
32 };
33
34 class VisibleBrowserTest : public UITest { 31 class VisibleBrowserTest : public UITest {
35 protected: 32 protected:
36 VisibleBrowserTest() : UITest() { 33 VisibleBrowserTest() : UITest() {
37 show_window_ = true; 34 show_window_ = true;
38 } 35 }
39 }; 36 };
40 37
41 } // namespace 38 } // namespace
42 39
43 // The browser should quit quickly if it receives a WM_ENDSESSION message 40 // The browser should quit quickly if it receives a WM_ENDSESSION message
44 // on Windows, or SIGTERM on posix. 41 // on Windows, or SIGTERM on posix.
45 TEST_F(BrowserTest, SessionEnd) { 42 TEST_F(UITest, SessionEnd) {
sky 2012/03/22 22:48:10 Leave this as BrowserTest. If you're annoyed by th
scheib 2012/03/26 23:30:46 There is a name conflict because BrowserTest is no
46 FilePath test_file(test_data_directory_); 43 FilePath test_file(test_data_directory_);
47 test_file = test_file.AppendASCII("title1.html"); 44 test_file = test_file.AppendASCII("title1.html");
48 45
49 NavigateToURL(net::FilePathToFileURL(test_file)); 46 NavigateToURL(net::FilePathToFileURL(test_file));
50 TerminateBrowser(); 47 TerminateBrowser();
51 } 48 }
52 49
53 TEST_F(VisibleBrowserTest, WindowOpenClose) { 50 TEST_F(VisibleBrowserTest, WindowOpenClose) {
54 FilePath test_file(test_data_directory_); 51 FilePath test_file(test_data_directory_);
55 test_file = test_file.AppendASCII("window.close.html"); 52 test_file = test_file.AppendASCII("window.close.html");
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 228
232 // Verify that the window is present. 229 // Verify that the window is present.
233 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); 230 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
234 ASSERT_TRUE(browser.get()); 231 ASSERT_TRUE(browser.get());
235 232
236 // Verify the browser is in application mode. 233 // Verify the browser is in application mode.
237 bool is_application; 234 bool is_application;
238 ASSERT_TRUE(browser->IsApplication(&is_application)); 235 ASSERT_TRUE(browser->IsApplication(&is_application));
239 EXPECT_TRUE(is_application); 236 EXPECT_TRUE(is_application);
240 } 237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698