Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: chrome/browser/extensions/browser_action_apitest.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/browser_tabstrip.h"
6
5 // Tests that tooltips of a browser action icon can be specified using UTF8. 7 // Tests that tooltips of a browser action icon can be specified using UTF8.
6 // See http://crbug.com/25349. 8 // See http://crbug.com/25349.
7 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) { 9 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, TitleLocalizationBrowserAction) {
8 ExtensionService* service = browser()->profile()->GetExtensionService(); 10 ExtensionService* service = browser()->profile()->GetExtensionService();
9 const size_t size_before = service->extensions()->size(); 11 const size_t size_before = service->extensions()->size();
10 FilePath extension_path(test_data_dir_.AppendASCII("browsertest") 12 FilePath extension_path(test_data_dir_.AppendASCII("browsertest")
11 .AppendASCII("title_localized")); 13 .AppendASCII("title_localized"));
12 const Extension* extension = LoadExtension(extension_path); 14 const Extension* extension = LoadExtension(extension_path);
13 ASSERT_TRUE(extension); 15 ASSERT_TRUE(extension);
14 16
15 ASSERT_EQ(size_before + 1, service->extensions()->size()); 17 ASSERT_EQ(size_before + 1, service->extensions()->size());
16 18
17 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur: l10n browser action").c_str(), 19 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur: l10n browser action").c_str(),
18 extension->description().c_str()); 20 extension->description().c_str());
19 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(), 21 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur is my name").c_str(),
20 extension->name().c_str()); 22 extension->name().c_str());
21 int tab_id = ExtensionTabUtil::GetTabId(browser()->GetActiveWebContents()); 23 int tab_id = ExtensionTabUtil::GetTabId(
24 chrome::GetActiveWebContents(browser()));
22 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(), 25 EXPECT_STREQ(WideToUTF8(L"Hreggvi\u00F0ur").c_str(),
23 extension->browser_action()->GetTitle(tab_id).c_str()); 26 extension->browser_action()->GetTitle(tab_id).c_str());
24 } 27 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | chrome/browser/extensions/browser_extension_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698