OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/string16.h" | 6 #include "base/string16.h" |
7 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 void AssertIsOptionsPage(TabProxy* tab) { | 28 void AssertIsOptionsPage(TabProxy* tab) { |
29 std::wstring title; | 29 std::wstring title; |
30 ASSERT_TRUE(tab->GetTabTitle(&title)); | 30 ASSERT_TRUE(tab->GetTabTitle(&title)); |
31 string16 expected_title = l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE); | 31 string16 expected_title = l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE); |
32 // The only guarantee we can make about the title of a settings tab is that | 32 // The only guarantee we can make about the title of a settings tab is that |
33 // it should contain IDS_SETTINGS_TITLE somewhere. | 33 // it should contain IDS_SETTINGS_TITLE somewhere. |
34 ASSERT_FALSE(WideToUTF16Hack(title).find(expected_title) == string16::npos); | 34 ASSERT_FALSE(WideToUTF16Hack(title).find(expected_title) == string16::npos); |
35 } | 35 } |
36 }; | 36 }; |
37 | 37 |
38 TEST_F(OptionsUITest, LoadOptionsByURL) { | 38 // Flaky: http://crbug.com/77375 |
| 39 TEST_F(OptionsUITest, FLAKY_LoadOptionsByURL) { |
39 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 40 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
40 ASSERT_TRUE(browser.get()); | 41 ASSERT_TRUE(browser.get()); |
41 | 42 |
42 scoped_refptr<TabProxy> tab = browser->GetActiveTab(); | 43 scoped_refptr<TabProxy> tab = browser->GetActiveTab(); |
43 ASSERT_TRUE(tab.get()); | 44 ASSERT_TRUE(tab.get()); |
44 | 45 |
45 // Go to the options tab via URL. | 46 // Go to the options tab via URL. |
46 NavigateToURL(GURL(chrome::kChromeUISettingsURL)); | 47 NavigateToURL(GURL(chrome::kChromeUISettingsURL)); |
47 AssertIsOptionsPage(tab); | 48 AssertIsOptionsPage(tab); |
48 } | 49 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 ASSERT_TRUE(browser->GetTabCount(&tab_count)); | 107 ASSERT_TRUE(browser->GetTabCount(&tab_count)); |
107 ASSERT_EQ(1, tab_count); | 108 ASSERT_EQ(1, tab_count); |
108 | 109 |
109 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); | 110 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); |
110 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); | 111 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); |
111 ASSERT_TRUE(browser->GetTabCount(&tab_count)); | 112 ASSERT_TRUE(browser->GetTabCount(&tab_count)); |
112 ASSERT_EQ(2, tab_count); | 113 ASSERT_EQ(2, tab_count); |
113 } | 114 } |
114 | 115 |
115 } // namespace | 116 } // namespace |
OLD | NEW |