summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/fragment_navigation_apitest.cc
diff options
context:
space:
mode:
authorasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:34:06 +0000
committerasargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:34:06 +0000
commitf6c2459d185424c66e4ef99eed7dc966039715e0 (patch)
tree6e2ce58cadb57edeb57c8bfa2127191164fb3222 /chrome/browser/extensions/fragment_navigation_apitest.cc
parenta6e82fccc2b73736c7a99e6293c6dfc04c6957ae (diff)
downloadchromium_src-f6c2459d185424c66e4ef99eed7dc966039715e0.zip
chromium_src-f6c2459d185424c66e4ef99eed7dc966039715e0.tar.gz
chromium_src-f6c2459d185424c66e4ef99eed7dc966039715e0.tar.bz2
Don't re-run content scripts on fragment navigations.
This regression was inadvertently introduced by a fix to make executeScript run after a fragment navigation (bug 29541). That patch was: http://codereview.chromium.org/566041 The problem is that on frame navigations (didChangeLocationWithinPage), we end up creating a new UserScriptIdleScheduler, so this patch keeps track of the previous has_run state and propagates that to the new UserScriptIdleScheduler. BUG=35924 TEST=Steps to verify are outlined in bug report Review URL: http://codereview.chromium.org/646017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39939 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/fragment_navigation_apitest.cc')
-rw-r--r--chrome/browser/extensions/fragment_navigation_apitest.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/chrome/browser/extensions/fragment_navigation_apitest.cc b/chrome/browser/extensions/fragment_navigation_apitest.cc
new file mode 100644
index 0000000..7524c91
--- /dev/null
+++ b/chrome/browser/extensions/fragment_navigation_apitest.cc
@@ -0,0 +1,19 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/extensions/extension_apitest.h"
+
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptFragmentNavigation) {
+ StartHTTPServer();
+ const char* extension_name = "content_scripts/fragment";
+ ASSERT_TRUE(RunExtensionTest(extension_name)) << message_;
+}
+
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ExecuteScriptFragmentNavigation) {
+ StartHTTPServer();
+ const char* extension_name = "executescript/fragment";
+ ASSERT_TRUE(RunExtensionTest(extension_name)) << message_;
+}
+