| OLD | NEW |
| 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 "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/string16.h" | 7 #include "base/string16.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" |
| 11 #include "chrome/common/url_constants.h" | 11 #include "chrome/common/url_constants.h" |
| 12 #include "chrome/test/automation/browser_proxy.h" | 12 #include "chrome/test/automation/browser_proxy.h" |
| 13 #include "chrome/test/automation/tab_proxy.h" | 13 #include "chrome/test/automation/tab_proxy.h" |
| 14 #include "chrome/test/automation/window_proxy.h" | 14 #include "chrome/test/automation/window_proxy.h" |
| 15 #include "chrome/test/ui/ui_test.h" | 15 #include "chrome/test/ui/ui_test.h" |
| 16 | 16 |
| 17 #include "grit/chromium_strings.h" | 17 #include "grit/chromium_strings.h" |
| 18 #include "grit/generated_resources.h" | 18 #include "grit/generated_resources.h" |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 class OptionsUITest : public UITest { | 22 class OptionsUITest : public UITest { |
| 23 public: | 23 public: |
| 24 OptionsUITest() { | 24 OptionsUITest() { |
| 25 dom_automation_enabled_ = true; | 25 dom_automation_enabled_ = true; |
| 26 // TODO(csilv): Remove when dom-ui options is enabled by default. | |
| 27 launch_arguments_.AppendSwitch(switches::kEnableTabbedOptions); | |
| 28 } | 26 } |
| 29 | 27 |
| 30 void AssertIsOptionsPage(TabProxy* tab) { | 28 void AssertIsOptionsPage(TabProxy* tab) { |
| 31 std::wstring title; | 29 std::wstring title; |
| 32 ASSERT_TRUE(tab->GetTabTitle(&title)); | 30 ASSERT_TRUE(tab->GetTabTitle(&title)); |
| 33 string16 expected_title = l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE); | 31 string16 expected_title = l10n_util::GetStringUTF16(IDS_SETTINGS_TITLE); |
| 34 ASSERT_EQ(expected_title, WideToUTF16Hack(title)); | 32 ASSERT_EQ(expected_title, WideToUTF16Hack(title)); |
| 35 } | 33 } |
| 36 }; | 34 }; |
| 37 | 35 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 ASSERT_TRUE(browser->GetTabCount(&tab_count)); | 117 ASSERT_TRUE(browser->GetTabCount(&tab_count)); |
| 120 ASSERT_EQ(1, tab_count); | 118 ASSERT_EQ(1, tab_count); |
| 121 | 119 |
| 122 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); | 120 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); |
| 123 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); | 121 ASSERT_TRUE(browser->RunCommand(IDC_OPTIONS)); |
| 124 ASSERT_TRUE(browser->GetTabCount(&tab_count)); | 122 ASSERT_TRUE(browser->GetTabCount(&tab_count)); |
| 125 ASSERT_EQ(2, tab_count); | 123 ASSERT_EQ(2, tab_count); |
| 126 } | 124 } |
| 127 | 125 |
| 128 } // namespace | 126 } // namespace |
| OLD | NEW |