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

Unified Diff: chrome/test/automation/dom_element_proxy.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/dom_element_proxy.h ('k') | chrome/test/automation/extension_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/automation/dom_element_proxy.cc
diff --git a/chrome/test/automation/dom_element_proxy.cc b/chrome/test/automation/dom_element_proxy.cc
index 8dce0730bd024e40a4cba295ff5949248cd5f981..41d54c77626020a8db3d4d2cfc7a9f5e94f8b153 100644
--- a/chrome/test/automation/dom_element_proxy.cc
+++ b/chrome/test/automation/dom_element_proxy.cc
@@ -6,7 +6,6 @@
#include "chrome/test/automation/javascript_execution_controller.h"
#include "chrome/test/automation/javascript_message_utils.h"
-#include "testing/gtest/include/gtest/gtest.h"
using javascript_utils::JavaScriptPrintf;
@@ -239,47 +238,13 @@ bool DOMElementProxy::GetVisibility(bool* visibility) {
return GetValue("visibility", visibility);
}
-void DOMElementProxy::EnsureFindNoElements(const By& by) {
- std::vector<DOMElementProxyRef> elements;
- ASSERT_TRUE(FindElements(by, &elements));
- ASSERT_EQ(0u, elements.size());
-}
-
-void DOMElementProxy::EnsureTextMatches(const std::string& expected_text) {
- std::string text;
- ASSERT_TRUE(GetText(&text));
- ASSERT_EQ(expected_text, text);
-}
-
-void DOMElementProxy::EnsureInnerHTMLMatches(const std::string& expected_html) {
- std::string html;
- ASSERT_TRUE(GetInnerHTML(&html));
- ASSERT_EQ(expected_html, html);
-}
-
-void DOMElementProxy::EnsureNameMatches(const std::string& expected_name) {
- std::string name;
- ASSERT_TRUE(GetName(&name));
- ASSERT_EQ(expected_name, name);
-}
-
-void DOMElementProxy::EnsureVisibilityMatches(bool expected_visibility) {
- bool visibility;
- ASSERT_TRUE(GetVisibility(&visibility));
- ASSERT_EQ(expected_visibility, visibility);
-}
-
-void DOMElementProxy::EnsureAttributeEventuallyMatches(
+bool DOMElementProxy::DoesAttributeEventuallyMatch(
const std::string& attribute, const std::string& new_value) {
- ASSERT_TRUE(is_valid());
-
const char* script = "domAutomation.waitForAttribute("
"domAutomation.getObject(%s), %s, %s,"
"domAutomation.getCallId())";
- if (!executor_->ExecuteAsyncJavaScript(
- JavaScriptPrintf(script, this->handle(), attribute, new_value))) {
- FAIL() << "Executing or parsing JavaScript failed";
- }
+ return executor_->ExecuteAsyncJavaScript(
+ JavaScriptPrintf(script, this->handle(), attribute, new_value));
}
template <typename T>
« no previous file with comments | « chrome/test/automation/dom_element_proxy.h ('k') | chrome/test/automation/extension_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698