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

Side by Side Diff: chrome/browser/extensions/api/declarative_content/declarative_content_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/extension_action.h" 5 #include "chrome/browser/extensions/extension_action.h"
6 #include "chrome/browser/extensions/extension_action_manager.h" 6 #include "chrome/browser/extensions/extension_action_manager.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_tab_util.h" 8 #include "chrome/browser/extensions/extension_tab_util.h"
9 #include "chrome/browser/extensions/extension_test_message_listener.h" 9 #include "chrome/browser/extensions/extension_test_message_listener.h"
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" 10 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 // Make sure leaving a matching page unshows the page action. 50 // Make sure leaving a matching page unshows the page action.
51 NavigateInRenderer(tab, GURL("http://not_checked/")); 51 NavigateInRenderer(tab, GURL("http://not_checked/"));
52 EXPECT_FALSE(page_action->GetIsVisible(tab_id)); 52 EXPECT_FALSE(page_action->GetIsVisible(tab_id));
53 53
54 // Insert a password field to make sure that's noticed. 54 // Insert a password field to make sure that's noticed.
55 ASSERT_TRUE(content::ExecuteScript( 55 ASSERT_TRUE(content::ExecuteScript(
56 tab, "document.body.innerHTML = '<input type=\"password\">';")); 56 tab, "document.body.innerHTML = '<input type=\"password\">';"));
57 // Give the mutation observer a chance to run and send back the 57 // Give the mutation observer a chance to run and send back the
58 // matching-selector update. 58 // matching-selector update.
59 ASSERT_TRUE(content::ExecuteScript(tab, "")); 59 ASSERT_TRUE(content::ExecuteScript(tab, std::string()));
60 EXPECT_TRUE(page_action->GetIsVisible(tab_id)); 60 EXPECT_TRUE(page_action->GetIsVisible(tab_id));
61 61
62 // Remove it again to make sure that reverts the action. 62 // Remove it again to make sure that reverts the action.
63 ASSERT_TRUE(content::ExecuteScript( 63 ASSERT_TRUE(content::ExecuteScript(
64 tab, "document.body.innerHTML = 'Hello world';")); 64 tab, "document.body.innerHTML = 'Hello world';"));
65 // Give the mutation observer a chance to run and send back the 65 // Give the mutation observer a chance to run and send back the
66 // matching-selector update. 66 // matching-selector update.
67 ASSERT_TRUE(content::ExecuteScript(tab, "")); 67 ASSERT_TRUE(content::ExecuteScript(tab, std::string()));
68 EXPECT_FALSE(page_action->GetIsVisible(tab_id)); 68 EXPECT_FALSE(page_action->GetIsVisible(tab_id));
69 } 69 }
70 70
71 } // namespace 71 } // namespace
72 } // namespace extensions 72 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698