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

Unified Diff: chrome/browser/extensions/extension_action_runner_unittest.cc

Issue 1809813002: [Extensions] Show a "refresh" bubble when needed with click-to-script (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_action_runner_unittest.cc
diff --git a/chrome/browser/extensions/extension_action_runner_unittest.cc b/chrome/browser/extensions/extension_action_runner_unittest.cc
index 2aaff8c1ae4df66337599ff5ed554ca668ba0b92..edacb84968661cd8c9f15d7c8b1180e1c47d1b70 100644
--- a/chrome/browser/extensions/extension_action_runner_unittest.cc
+++ b/chrome/browser/extensions/extension_action_runner_unittest.cc
@@ -209,7 +209,7 @@ TEST_F(ExtensionActionRunnerUnitTest, RequestPermissionAndExecute) {
EXPECT_EQ(0u, GetExecutionCountForExtension(extension->id()));
// Click to accept the extension executing.
- runner()->RunAction(extension, true);
+ runner()->RunForTesting(extension);
// The extension should execute, and the extension shouldn't want to run.
EXPECT_EQ(1u, GetExecutionCountForExtension(extension->id()));
@@ -234,7 +234,7 @@ TEST_F(ExtensionActionRunnerUnitTest, RequestPermissionAndExecute) {
// Grant access.
RequestInjection(extension);
- runner()->RunAction(extension, true);
+ runner()->RunForTesting(extension);
EXPECT_EQ(2u, GetExecutionCountForExtension(extension->id()));
EXPECT_FALSE(runner()->WantsToRun(extension));
@@ -266,7 +266,7 @@ TEST_F(ExtensionActionRunnerUnitTest, PendingInjectionsRemovedAtNavigation) {
// Request and accept a new injection.
RequestInjection(extension);
- runner()->RunAction(extension, true);
+ runner()->RunForTesting(extension);
// The extension should only have executed once, even though a grand total
// of two executions were requested.
@@ -290,7 +290,7 @@ TEST_F(ExtensionActionRunnerUnitTest, MultiplePendingInjection) {
EXPECT_EQ(0u, GetExecutionCountForExtension(extension->id()));
- runner()->RunAction(extension, true);
+ runner()->RunForTesting(extension);
// All pending injections should have executed.
EXPECT_EQ(kNumInjections, GetExecutionCountForExtension(extension->id()));
@@ -388,7 +388,7 @@ TEST_F(ExtensionActionRunnerUnitTest, TestAlwaysRun) {
// Allow the extension to always run on this origin.
ScriptingPermissionsModifier modifier(profile(), extension);
modifier.GrantHostPermission(web_contents()->GetLastCommittedURL());
- runner()->RunAction(extension, true);
+ runner()->RunForTesting(extension);
// The extension should execute, and the extension shouldn't want to run.
EXPECT_EQ(1u, GetExecutionCountForExtension(extension->id()));
@@ -444,7 +444,7 @@ TEST_F(ExtensionActionRunnerUnitTest, TestDifferentScriptRunLocations) {
EXPECT_EQ(BLOCKED_ACTION_SCRIPT_AT_START | BLOCKED_ACTION_SCRIPT_OTHER,
runner()->GetBlockedActions(extension));
- runner()->RunAction(extension, true);
+ runner()->RunForTesting(extension);
EXPECT_EQ(BLOCKED_ACTION_NONE, runner()->GetBlockedActions(extension));
}

Powered by Google App Engine
This is Rietveld 408576698