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

Side by Side Diff: chrome/browser/extensions/api/extension_action/script_badge_apitest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/extensions/browser_event_router.h" 5 #include "chrome/browser/extensions/browser_event_router.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_apitest.h" 8 #include "chrome/browser/extensions/extension_apitest.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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 browser()->profile())->extension_service(); 81 browser()->profile())->extension_service();
82 service->browser_event_router()->ScriptBadgeExecuted( 82 service->browser_event_router()->ScriptBadgeExecuted(
83 browser()->profile(), *script_badge, tab_id); 83 browser()->profile(), *script_badge, tab_id);
84 EXPECT_TRUE(catcher.GetNextResult()); 84 EXPECT_TRUE(catcher.GetNextResult());
85 } 85 }
86 86
87 { 87 {
88 ResultCatcher catcher; 88 ResultCatcher catcher;
89 // Visit a non-extension page so the extension can run a content script and 89 // Visit a non-extension page so the extension can run a content script and
90 // cause the script badge to be animated in. 90 // cause the script badge to be animated in.
91 ui_test_utils::NavigateToURL(browser(), test_server()->GetURL("")); 91 ui_test_utils::NavigateToURL(browser(),
92 test_server()->GetURL(std::string()));
92 ASSERT_TRUE(catcher.GetNextResult()); 93 ASSERT_TRUE(catcher.GetNextResult());
93 } 94 }
94 EXPECT_TRUE(script_badge->GetIsVisible(tab_id)); 95 EXPECT_TRUE(script_badge->GetIsVisible(tab_id));
95 EXPECT_THAT(location_bar_controller->GetCurrentActions(), 96 EXPECT_THAT(location_bar_controller->GetCurrentActions(),
96 testing::ElementsAre(script_badge)); 97 testing::ElementsAre(script_badge));
97 } 98 }
98 99
99 } // namespace 100 } // namespace
100 } // namespace extensions 101 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698