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

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

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
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 "base/strings/utf_string_conversions.h" 5 #include "base/strings/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_action_test_util.h" 8 #include "chrome/browser/extensions/extension_action_test_util.h"
9 #include "chrome/browser/extensions/extension_browsertest.h" 9 #include "chrome/browser/extensions/extension_browsertest.h"
10 #include "chrome/browser/extensions/extension_tab_util.h" 10 #include "chrome/browser/extensions/extension_tab_util.h"
(...skipping 15 matching lines...) Expand all
26 26
27 const std::string kHashPageA = 27 const std::string kHashPageA =
28 "files/extensions/api_test/page_action/hash_change/test_page_A.html"; 28 "files/extensions/api_test/page_action/hash_change/test_page_A.html";
29 const std::string kHashPageAHash = kHashPageA + "#asdf"; 29 const std::string kHashPageAHash = kHashPageA + "#asdf";
30 const std::string kHashPageB = 30 const std::string kHashPageB =
31 "files/extensions/api_test/page_action/hash_change/test_page_B.html"; 31 "files/extensions/api_test/page_action/hash_change/test_page_B.html";
32 32
33 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageActionCrash25562) { 33 IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, PageActionCrash25562) {
34 ASSERT_TRUE(test_server()->Start()); 34 ASSERT_TRUE(test_server()->Start());
35 35
36 CommandLine::ForCurrentProcess()->AppendSwitch( 36 base::CommandLine::ForCurrentProcess()->AppendSwitch(
37 switches::kAllowLegacyExtensionManifests); 37 switches::kAllowLegacyExtensionManifests);
38 38
39 // This page action will not show an icon, since it doesn't specify one but 39 // This page action will not show an icon, since it doesn't specify one but
40 // is included here to test for a crash (http://crbug.com/25562). 40 // is included here to test for a crash (http://crbug.com/25562).
41 ASSERT_TRUE(LoadExtension( 41 ASSERT_TRUE(LoadExtension(
42 test_data_dir_.AppendASCII("browsertest") 42 test_data_dir_.AppendASCII("browsertest")
43 .AppendASCII("crash_25562"))); 43 .AppendASCII("crash_25562")));
44 44
45 // Navigate to the feed page. 45 // Navigate to the feed page.
46 GURL feed_url = test_server()->GetURL(kFeedPage); 46 GURL feed_url = test_server()->GetURL(kFeedPage);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 int tab_id = ExtensionTabUtil::GetTabId( 200 int tab_id = ExtensionTabUtil::GetTabId(
201 browser()->tab_strip_model()->GetActiveWebContents()); 201 browser()->tab_strip_model()->GetActiveWebContents());
202 EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur").c_str(), 202 EXPECT_STREQ(base::WideToUTF8(L"Hreggvi\u00F0ur").c_str(),
203 ExtensionActionManager::Get(browser()->profile())-> 203 ExtensionActionManager::Get(browser()->profile())->
204 GetPageAction(*extension)-> 204 GetPageAction(*extension)->
205 GetTitle(tab_id).c_str()); 205 GetTitle(tab_id).c_str());
206 } 206 }
207 207
208 } // namespace 208 } // namespace
209 } // namespace extensions 209 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/pack_extension_unittest.cc ('k') | chrome/browser/extensions/plugin_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698