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 01fe26ba0cf72bcc319482f4dd6684c120a1d75c..b206887ab78558e5bd099b65ff4cfbf840a9a2a1 100644 |
--- a/chrome/browser/extensions/active_script_controller_unittest.cc |
+++ b/chrome/browser/extensions/active_script_controller_unittest.cc |
@@ -282,7 +282,18 @@ TEST_F(ActiveScriptControllerUnitTest, ActiveScriptsUseActiveTabPermissions) { |
// Also test that granting active tab runs any pending tasks. |
Devlin
2014/08/15 21:24:00
this comment was somewhat misplaced before, and is
not at google - send to devlin
2014/08/15 21:38:29
Done.
|
Reload(); |
- // Navigating should mean we need permission again. |
+ // Reloading and other same-origin navigations maintain the permission to |
+ // execute. |
+ EXPECT_FALSE(RequiresUserConsent(extension)); |
+ NavigateAndCommit(GURL("https://www.google.com/some-page")); |
+ EXPECT_FALSE(RequiresUserConsent(extension)); |
+ |
+ // Navigating to a different origin will require user consent again. |
+ NavigateAndCommit(GURL("https://yahoo.com")); |
+ EXPECT_TRUE(RequiresUserConsent(extension)); |
+ |
+ // Back to the original origin should also re-require constent. |
+ NavigateAndCommit(GURL("https://www.google.com")); |
EXPECT_TRUE(RequiresUserConsent(extension)); |
RequestInjection(extension); |