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

Side by Side Diff: chrome/browser/sanity_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 // This is a file for random testcases that we run into that at one point or 5 // This is a file for random testcases that we run into that at one point or
6 // another have crashed the program. 6 // another have crashed the program.
7 7
8 #include "chrome/test/ui/ui_test.h" 8 #include "chrome/test/ui/ui_test.h"
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "net/base/net_util.h" 13 #include "net/base/net_util.h"
14 14
15 class GoogleTest : public UITest { 15 class GoogleTest : public UITest {
16 protected: 16 protected:
17 GoogleTest() : UITest() { 17 GoogleTest() : UITest() {
18 FilePath test_file = 18 FilePath test_file =
19 test_data_directory_.AppendASCII("google").AppendASCII("google.html"); 19 test_data_directory_.AppendASCII("google").AppendASCII("google.html");
20 homepage_ = GURL(net::FilePathToFileURL(test_file)).spec(); 20 set_homepage(GURL(net::FilePathToFileURL(test_file)).spec());
21 } 21 }
22 }; 22 };
23 23
24 TEST_F(GoogleTest, Crash) { 24 TEST_F(GoogleTest, Crash) {
25 std::wstring page_title = L"Google"; 25 std::wstring page_title = L"Google";
26 26
27 // Make sure the navigation succeeded. 27 // Make sure the navigation succeeded.
28 EXPECT_EQ(page_title, GetActiveTabTitle()); 28 EXPECT_EQ(page_title, GetActiveTabTitle());
29 29
30 // UITest will check if this crashed. 30 // UITest will check if this crashed.
31 } 31 }
32 32
33 class ColumnLayout : public UITest { 33 class ColumnLayout : public UITest {
34 protected: 34 protected:
35 ColumnLayout() : UITest() { 35 ColumnLayout() : UITest() {
36 FilePath test_file = test_data_directory_.AppendASCII("columns.html"); 36 FilePath test_file = test_data_directory_.AppendASCII("columns.html");
37 homepage_ = GURL(net::FilePathToFileURL(test_file)).spec(); 37 set_homepage(GURL(net::FilePathToFileURL(test_file)).spec());
38 } 38 }
39 }; 39 };
40 40
41 TEST_F(ColumnLayout, Crash) { 41 TEST_F(ColumnLayout, Crash) {
42 std::wstring page_title = L"Column test"; 42 std::wstring page_title = L"Column test";
43 43
44 // Make sure the navigation succeeded. 44 // Make sure the navigation succeeded.
45 EXPECT_EQ(page_title, GetActiveTabTitle()); 45 EXPECT_EQ(page_title, GetActiveTabTitle());
46 46
47 // UITest will check if this crashed. 47 // UITest will check if this crashed.
(...skipping 12 matching lines...) Expand all
60 launch_arguments_.AppendSwitchASCII(switches::kTryChromeAgain, "10001"); 60 launch_arguments_.AppendSwitchASCII(switches::kTryChromeAgain, "10001");
61 } 61 }
62 }; 62 };
63 63
64 // Disabled: http://crbug.com/45115 64 // Disabled: http://crbug.com/45115
65 // Due to limitations in our test infrastructure, this test currently doesn't 65 // Due to limitations in our test infrastructure, this test currently doesn't
66 // work. 66 // work.
67 TEST_F(EarlyReturnTest, DISABLED_ToastCrasher) { 67 TEST_F(EarlyReturnTest, DISABLED_ToastCrasher) {
68 // UITest will check if this crashed. 68 // UITest will check if this crashed.
69 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698