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

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

Issue 304763002: Trust the renderer's same-document navigation flag if it is a same-origin nav. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: isNavigationInPage->isFragmentNavigation, with caveat on the name Created 6 years, 7 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/active_script_controller_unittest.cc
diff --git a/chrome/browser/extensions/active_script_controller_unittest.cc b/chrome/browser/extensions/active_script_controller_unittest.cc
index a670a53fed45783e2f0b3d8462a57a83011ecc13..0b40328c14329891aeb22953d731e3e46710b495 100644
--- a/chrome/browser/extensions/active_script_controller_unittest.cc
+++ b/chrome/browser/extensions/active_script_controller_unittest.cc
@@ -219,9 +219,9 @@ TEST_F(ActiveScriptControllerUnitTest, PendingInjectionsRemovedAtNavigation) {
EXPECT_TRUE(controller()->GetActionForExtension(extension));
EXPECT_EQ(0u, GetExecutionCountForExtension(extension->id()));
- // Navigate away. This should remove the pending injection, and we should not
+ // Reload. This should remove the pending injection, and we should not
// execute anything.
- NavigateAndCommit(GURL("https://www.google.com"));
+ Reload();
EXPECT_FALSE(controller()->GetActionForExtension(extension));
EXPECT_EQ(0u, GetExecutionCountForExtension(extension->id()));
@@ -281,7 +281,7 @@ TEST_F(ActiveScriptControllerUnitTest, ActiveScriptsUseActiveTabPermissions) {
EXPECT_FALSE(controller()->RequiresUserConsentForScriptInjection(extension));
// Also test that granting active tab runs any pending tasks.
- NavigateAndCommit(GURL("https://www.google.com"));
+ Reload();
// Navigating should mean we need permission again.
EXPECT_TRUE(controller()->RequiresUserConsentForScriptInjection(extension));

Powered by Google App Engine
This is Rietveld 408576698