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

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

Issue 19045002: Use Blink support to watch CSS selectors directly instead of using a MutationObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial Created 7 years, 2 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
« no previous file with comments | « no previous file | chrome/chrome_renderer.gypi » ('j') | chrome/renderer/extensions/content_watcher.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 798c4f488fa285bf389814e59974b969f0aa9722..74687f6169fe4d059603b8e680ffcb4e3d41184a 100644
--- a/chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc
+++ b/chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc
@@ -96,8 +96,9 @@ IN_PROC_BROWSER_TEST_F(DeclarativeContentApiTest, Overview) {
// Insert a password field to make sure that's noticed.
ASSERT_TRUE(content::ExecuteScript(
tab, "document.body.innerHTML = '<input type=\"password\">';"));
- // Give the mutation observer a chance to run and send back the
- // matching-selector update.
+ // Give the style match a chance to run and send back the matching-selector
+ // update. This takes two times through the event loop.
+ ASSERT_TRUE(content::ExecuteScript(tab, std::string()));
ASSERT_TRUE(content::ExecuteScript(tab, std::string()));
Matt Perry 2013/10/02 22:20:22 This double call looks fishy. Are you just calling
Jeffrey Yasskin 2013/10/03 00:31:57 It's to force a RunMessageLoop in the Blink proces
EXPECT_TRUE(page_action->GetIsVisible(tab_id))
<< "Adding a matching element should show the page action.";
« no previous file with comments | « no previous file | chrome/chrome_renderer.gypi » ('j') | chrome/renderer/extensions/content_watcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698