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

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

Issue 10514013: Filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, reland Created 8 years, 5 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/lazy_background_page_apitest.cc
diff --git a/chrome/browser/extensions/lazy_background_page_apitest.cc b/chrome/browser/extensions/lazy_background_page_apitest.cc
index 5a54454544476c2083457633fee3f8fb1d1407eb..23a067c76ca799834b4bcd26aa8d1d5a6c5da1ea 100644
--- a/chrome/browser/extensions/lazy_background_page_apitest.cc
+++ b/chrome/browser/extensions/lazy_background_page_apitest.cc
@@ -167,6 +167,22 @@ IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, BroadcastEvent) {
GetLocationBarForTesting()->PageActionVisibleCount());
}
+IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, Filters) {
+ const Extension* extension = LoadExtensionAndWait("filters");
+ ASSERT_TRUE(extension);
+
+ // Lazy Background Page doesn't exist yet.
+ ExtensionProcessManager* pm =
+ browser()->profile()->GetExtensionProcessManager();
+ EXPECT_FALSE(pm->GetBackgroundHostForExtension(last_loaded_extension_id_));
+
+ // Open a tab to a URL that will fire a webNavigation event.
+ LazyBackgroundObserver page_complete;
+ ui_test_utils::NavigateToURL(
+ browser(), test_server()->GetURL("files/extensions/test_file.html"));
+ page_complete.Wait();
+}
+
// Tests that the lazy background page receives the onInstalled event and shuts
// down.
IN_PROC_BROWSER_TEST_F(LazyBackgroundPageApiTest, OnInstalled) {
« no previous file with comments | « chrome/browser/extensions/extension_processes_api.cc ('k') | chrome/browser/extensions/system/system_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698