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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 AssertIsOptionsPage(tab); | 142 AssertIsOptionsPage(tab); |
143 | 143 |
144 // Check navbar's existence. | 144 // Check navbar's existence. |
145 bool navbar_exist = false; | 145 bool navbar_exist = false; |
146 ASSERT_TRUE(tab->ExecuteAndExtractBool(L"", | 146 ASSERT_TRUE(tab->ExecuteAndExtractBool(L"", |
147 L"domAutomationController.send(" | 147 L"domAutomationController.send(" |
148 L"!!document.getElementById('navbar'))", &navbar_exist)); | 148 L"!!document.getElementById('navbar'))", &navbar_exist)); |
149 ASSERT_EQ(true, navbar_exist); | 149 ASSERT_EQ(true, navbar_exist); |
150 | 150 |
151 // Check section headers in navbar. | 151 // Check section headers in navbar. |
152 // For ChromeOS, there should be 1 + 6: | 152 // For ChromeOS, there should be 1 + 7: |
153 // search, basics, personal, systerm, internet, under the hood and users | 153 // Search, Basics, Personal, System, Internet, Under the Hood, |
154 // For other platforms, there should 1 + 3: | 154 // Users and Extensions. |
155 // search, basics, personal and under the hood. | 155 // For other platforms, there should 1 + 4: |
| 156 // Search, Basics, Personal, Under the Hood and Extensions. |
156 #if defined(OS_CHROMEOS) | 157 #if defined(OS_CHROMEOS) |
157 const int kExpectedSections = 1 + 6; | 158 const int kExpectedSections = 1 + 7; |
158 #else | 159 #else |
159 const int kExpectedSections = 1 + 3; | 160 const int kExpectedSections = 1 + 4; |
160 #endif | 161 #endif |
161 int num_of_sections = 0; | 162 int num_of_sections = 0; |
162 ASSERT_TRUE(tab->ExecuteAndExtractInt(L"", | 163 ASSERT_TRUE(tab->ExecuteAndExtractInt(L"", |
163 L"domAutomationController.send(" | 164 L"domAutomationController.send(" |
164 L"document.getElementById('navbar').children.length)", &num_of_sections)); | 165 L"document.getElementById('navbar').children.length)", &num_of_sections)); |
165 ASSERT_EQ(kExpectedSections, num_of_sections); | 166 ASSERT_EQ(kExpectedSections, num_of_sections); |
166 } | 167 } |
167 | 168 |
168 } // namespace | 169 } // namespace |
OLD | NEW |