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

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: 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 7b5a36dc568c78282d603e855df26d0674d5c3a1..f7782a0a8e86aafc47a9659677527fe13ee8fc80 100644
--- a/chrome/browser/extensions/active_script_controller_unittest.cc
+++ b/chrome/browser/extensions/active_script_controller_unittest.cc
@@ -219,7 +219,7 @@ TEST_F(ActiveScriptControllerUnitTest, PendingInjectionsRemovedAtNavigation) {
// Navigate away. This should remove the pending injection, and we should not
// execute anything.
- NavigateAndCommit(GURL("https://www.google.com"));
+ Reload();
nasko 2014/05/29 22:59:30 nit: Either the action or the comment is incorrect
Nate Chapin 2014/05/29 23:03:46 Depends on your definition of "away" :) Will clar
EXPECT_FALSE(controller()->GetActionForExtension(extension));
EXPECT_EQ(0u, GetExecutionCountForExtension(extension->id()));
@@ -279,7 +279,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