OLD | NEW |
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/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "chrome/browser/extensions/extension_browsertest.h" | 6 #include "chrome/browser/extensions/extension_browsertest.h" |
7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
8 #include "chrome/browser/extensions/extension_tab_util.h" | 8 #include "chrome/browser/extensions/extension_tab_util.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_tabstrip.h" |
10 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
11 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
12 #include "chrome/test/base/ui_test_utils.h" | 13 #include "chrome/test/base/ui_test_utils.h" |
13 | 14 |
14 using extensions::Extension; | 15 using extensions::Extension; |
15 | 16 |
16 const std::string kFeedPage = "files/feeds/feed.html"; | 17 const std::string kFeedPage = "files/feeds/feed.html"; |
17 const std::string kNoFeedPage = "files/feeds/no_feed.html"; | 18 const std::string kNoFeedPage = "files/feeds/no_feed.html"; |
18 const std::string kLocalization = | 19 const std::string kLocalization = |
19 "files/extensions/browsertest/title_localized_pa/simple.html"; | 20 "files/extensions/browsertest/title_localized_pa/simple.html"; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 GURL url = test_server()->GetURL(kLocalization); | 180 GURL url = test_server()->GetURL(kLocalization); |
180 ui_test_utils::NavigateToURL(browser(), url); | 181 ui_test_utils::NavigateToURL(browser(), url); |
181 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1)); | 182 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1)); |
182 | 183 |
183 ASSERT_EQ(size_before + 1, service->extensions()->size()); | 184 ASSERT_EQ(size_before + 1, service->extensions()->size()); |
184 | 185 |
185 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur: l10n page action").c_str(), | 186 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur: l10n page action").c_str(), |
186 extension->description().c_str()); | 187 extension->description().c_str()); |
187 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), | 188 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), |
188 extension->name().c_str()); | 189 extension->name().c_str()); |
189 int tab_id = ExtensionTabUtil::GetTabId(browser()->GetActiveWebContents()); | 190 int tab_id = ExtensionTabUtil::GetTabId( |
| 191 chrome::GetActiveWebContents(browser())); |
190 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(), | 192 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(), |
191 extension->page_action()->GetTitle(tab_id).c_str()); | 193 extension->page_action()->GetTitle(tab_id).c_str()); |
192 } | 194 } |
OLD | NEW |