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

Unified Diff: chrome/browser/extensions/api/extension_action/browser_action_apitest.cc

Issue 10909256: Always send the full tab object in ExtensionAction click event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: kalments Created 8 years, 3 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/browser/extensions/api/messaging/message_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
diff --git a/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc b/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
index 5844901e376a7d3998d6b306c2f76b9e5d0bd6a1..11f8ccbc5f380575bcce1196ac23aec9bedf5111 100644
--- a/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
+++ b/chrome/browser/extensions/api/extension_action/browser_action_apitest.cc
@@ -101,7 +101,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, Basic) {
ResultCatcher catcher;
ui_test_utils::NavigateToURL(browser(),
GURL(extension->GetResourceURL("update.html")));
- ASSERT_TRUE(catcher.GetNextResult());
+ ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
// Test that we received the changes.
ExtensionAction* action = extension->browser_action();
@@ -117,16 +117,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, Basic) {
ExtensionService* service = browser()->profile()->GetExtensionService();
service->toolbar_model()->ExecuteBrowserAction(extension, browser(), NULL);
- // Verify the command worked.
- WebContents* tab = chrome::GetActiveWebContents(browser());
- bool result = false;
- ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
- tab->GetRenderViewHost(), L"",
- L"setInterval(function(){"
- L" if(document.body.bgColor == 'red'){"
- L" window.domAutomationController.send(true)}}, 100)",
- &result));
- ASSERT_TRUE(result);
+ ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
}
IN_PROC_BROWSER_TEST_F(BrowserActionApiTest, DynamicBrowserAction) {
« no previous file with comments | « no previous file | chrome/browser/extensions/api/messaging/message_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698