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

Unified Diff: chrome/test/automation/extension_proxy_uitest.cc

Issue 8584013: gtest / gmock shouldn't be in the shipping product (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert t_a_p change Created 9 years, 1 month 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 | « chrome/test/automation/extension_proxy.cc ('k') | chrome/test/perf/startup_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/extension_proxy_uitest.cc
diff --git a/chrome/test/automation/extension_proxy_uitest.cc b/chrome/test/automation/extension_proxy_uitest.cc
index 520a6dec339d03a24a288f2d6d493040bb444ff5..1bc00ae7ced732d23356d82839041e096c548d10 100644
--- a/chrome/test/automation/extension_proxy_uitest.cc
+++ b/chrome/test/automation/extension_proxy_uitest.cc
@@ -120,7 +120,13 @@ TEST_F(ExtensionProxyUITest, DISABLED_ExecuteBrowserActionInActiveTabAsync) {
// the tab's index.
ASSERT_TRUE(rename_tab_extension->
ExecuteActionInActiveTabAsync(browser.get()));
- ASSERT_NO_FATAL_FAILURE(automation()->EnsureExtensionTestResult());
+
+ bool result;
+ std::string message;
+
+ if (!automation()->GetExtensionTestResult(&result, &message))
+ FAIL() << "Could not send WaitForExtensionTestResult message";
+ ASSERT_TRUE(result) << "Extension test message: " << message;
scoped_refptr<TabProxy> display_tab = browser->GetTab(0);
ASSERT_TRUE(display_tab);
@@ -134,7 +140,9 @@ TEST_F(ExtensionProxyUITest, DISABLED_ExecuteBrowserActionInActiveTabAsync) {
ASSERT_TRUE(display_tab);
ASSERT_TRUE(rename_tab_extension->
ExecuteActionInActiveTabAsync(browser.get()));
- ASSERT_NO_FATAL_FAILURE(automation()->EnsureExtensionTestResult());
+ if (!automation()->GetExtensionTestResult(&result, &message))
+ FAIL() << "Could not send WaitForExtensionTestResult message";
+ ASSERT_TRUE(result) << "Extension test message: " << message;
ASSERT_TRUE(display_tab->GetTabTitle(&title_wstring));
ASSERT_STREQ(L"1", title_wstring.c_str());
@@ -144,25 +152,29 @@ TEST_F(ExtensionProxyUITest, DISABLED_ExecuteBrowserActionInActiveTabAsync) {
// Flaky, http://crbug.com/59441.
TEST_F(ExtensionProxyUITest, FLAKY_MoveBrowserAction) {
+ int action_index;
+
scoped_refptr<ExtensionProxy> rename_tab_extension =
InstallRenameTabExtension();
ASSERT_TRUE(rename_tab_extension.get());
- ASSERT_NO_FATAL_FAILURE(simple_extension_->
- EnsureBrowserActionIndexMatches(0));
- ASSERT_NO_FATAL_FAILURE(rename_tab_extension->
- EnsureBrowserActionIndexMatches(1));
+
+ ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&action_index));
+ ASSERT_EQ(0, action_index);
+ ASSERT_TRUE(rename_tab_extension->GetBrowserActionIndex(&action_index));
+ ASSERT_EQ(1, action_index);
// Move google translate to the end, then beginning, and verify.
ASSERT_TRUE(simple_extension_->MoveBrowserAction(1));
- ASSERT_NO_FATAL_FAILURE(simple_extension_->
- EnsureBrowserActionIndexMatches(1));
- ASSERT_NO_FATAL_FAILURE(rename_tab_extension->
- EnsureBrowserActionIndexMatches(0));
+ ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&action_index));
+ ASSERT_EQ(1, action_index);
+ ASSERT_TRUE(rename_tab_extension->GetBrowserActionIndex(&action_index));
+ ASSERT_EQ(0, action_index);
+
ASSERT_TRUE(simple_extension_->MoveBrowserAction(0));
- ASSERT_NO_FATAL_FAILURE(simple_extension_->
- EnsureBrowserActionIndexMatches(0));
- ASSERT_NO_FATAL_FAILURE(rename_tab_extension->
- EnsureBrowserActionIndexMatches(1));
+ ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&action_index));
+ ASSERT_EQ(0, action_index);
+ ASSERT_TRUE(rename_tab_extension->GetBrowserActionIndex(&action_index));
+ ASSERT_EQ(1, action_index);
// Try moving browser action to invalid index.
ASSERT_FALSE(simple_extension_->MoveBrowserAction(-1));
@@ -171,14 +183,21 @@ TEST_F(ExtensionProxyUITest, FLAKY_MoveBrowserAction) {
// Flaky, http://crbug.com/59440.
TEST_F(ExtensionProxyUITest, FLAKY_GetProperty) {
- ASSERT_NO_FATAL_FAILURE(simple_extension_->
- EnsureIdMatches("aiglobglfckejlcpcbdokbkbjeemfhno"));
- ASSERT_NO_FATAL_FAILURE(simple_extension_->
- EnsureNameMatches("Browser Action"));
- ASSERT_NO_FATAL_FAILURE(simple_extension_->
- EnsureVersionMatches("0.1.1"));
- ASSERT_NO_FATAL_FAILURE(simple_extension_->
- EnsureBrowserActionIndexMatches(0));
+ std::string id;
+ ASSERT_TRUE(simple_extension_->GetId(&id));
+ ASSERT_EQ("aiglobglfckejlcpcbdokbkbjeemfhno", id);
+
+ std::string name;
+ ASSERT_TRUE(simple_extension_->GetName(&name));
+ ASSERT_EQ("Browser Action", name);
+
+ std::string version;
+ ASSERT_TRUE(simple_extension_->GetVersion(&version));
+ ASSERT_EQ("0.1.1", version);
+
+ int browser_action_index;
+ ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&browser_action_index));
+ ASSERT_EQ(0, browser_action_index);
}
} // namespace
« no previous file with comments | « chrome/test/automation/extension_proxy.cc ('k') | chrome/test/perf/startup_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698