| 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_action.h" | 6 #include "chrome/browser/extensions/extension_action.h" |
| 7 #include "chrome/browser/extensions/extension_action_manager.h" | 7 #include "chrome/browser/extensions/extension_action_manager.h" |
| 8 #include "chrome/browser/extensions/extension_browsertest.h" | 8 #include "chrome/browser/extensions/extension_browsertest.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_system.h" | 10 #include "chrome/browser/extensions/extension_system.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 const Extension* extension = LoadExtension(extension_path); | 183 const Extension* extension = LoadExtension(extension_path); |
| 184 ASSERT_TRUE(extension); | 184 ASSERT_TRUE(extension); |
| 185 | 185 |
| 186 // Any navigation prompts the location bar to load the page action. | 186 // Any navigation prompts the location bar to load the page action. |
| 187 GURL url = test_server()->GetURL(kLocalization); | 187 GURL url = test_server()->GetURL(kLocalization); |
| 188 ui_test_utils::NavigateToURL(browser(), url); | 188 ui_test_utils::NavigateToURL(browser(), url); |
| 189 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1)); | 189 ASSERT_TRUE(WaitForPageActionVisibilityChangeTo(1)); |
| 190 | 190 |
| 191 ASSERT_EQ(size_before + 1, service->extensions()->size()); | 191 ASSERT_EQ(size_before + 1, service->extensions()->size()); |
| 192 | 192 |
| 193 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur: l10n page action").c_str(), | 193 EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur: l10n page action").c_str(), |
| 194 extension->description().c_str()); | 194 extension->description().c_str()); |
| 195 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), | 195 EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), |
| 196 extension->name().c_str()); | 196 extension->name().c_str()); |
| 197 int tab_id = ExtensionTabUtil::GetTabId( | 197 int tab_id = ExtensionTabUtil::GetTabId( |
| 198 browser()->tab_strip_model()->GetActiveWebContents()); | 198 browser()->tab_strip_model()->GetActiveWebContents()); |
| 199 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(), | 199 EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur").c_str(), |
| 200 ExtensionActionManager::Get(browser()->profile())-> | 200 ExtensionActionManager::Get(browser()->profile())-> |
| 201 GetPageAction(*extension)-> | 201 GetPageAction(*extension)-> |
| 202 GetTitle(tab_id).c_str()); | 202 GetTitle(tab_id).c_str()); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace | 205 } // namespace |
| 206 } // namespace extensions | 206 } // namespace extensions |
| OLD | NEW |