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

Unified Diff: chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc

Issue 1166393002: Reland "Encapsulate CSS selector declarative content condition tracking" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: address comments Created 5 years, 6 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/api/declarative_content/declarative_content_apitest.cc
diff --git a/chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc b/chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc
index 9c68d604e778cf9d3385a5f3099c00fa94bae939..0834e761c5d96fd9572501b3c5a28998cc0d2982 100644
--- a/chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc
+++ b/chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc
@@ -621,5 +621,21 @@ IN_PROC_BROWSER_TEST_F(DeclarativeContentApiTest,
testing::ContainsRegex("compound selector.*: div input$"));
}
+// https://crbug.com/497586
+IN_PROC_BROWSER_TEST_F(DeclarativeContentApiTest,
+ WebContentsWithoutTabAddedNotificationAtOnLoaded) {
+ // Add a web contents to the tab strip in a way that doesn't trigger
+ // NOTIFICATION_TAB_ADDED.
+ content::WebContents* contents = content::WebContents::Create(
+ content::WebContents::CreateParams(profile()));
+ browser()->tab_strip_model()->AppendWebContents(contents, false);
+
+ // The actual extension contents don't matter here -- we're just looking to
+ // trigger OnExtensionLoaded.
+ ext_dir_.WriteManifest(kDeclarativeContentManifest);
+ ext_dir_.WriteFile(FILE_PATH_LITERAL("background.js"), kBackgroundHelpers);
+ ASSERT_TRUE(LoadExtension(ext_dir_.unpacked_path()));
+}
+
} // namespace
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698