Lines Matching defs:expression

13 std::string WrapSend(const std::string& expression) {
14 return "window.domAutomationController.send(" + expression + ")";
28 void JSChecker::Evaluate(const std::string& expression) {
30 ASSERT_TRUE(content::ExecuteScript(web_contents_, expression));
33 bool JSChecker::GetBool(const std::string& expression) {
35 GetBoolImpl(expression, &result);
39 int JSChecker::GetInt(const std::string& expression) {
41 GetIntImpl(expression, &result);
45 std::string JSChecker::GetString(const std::string& expression) {
47 GetStringImpl(expression, &result);
51 void JSChecker::ExpectTrue(const std::string& expression) {
52 EXPECT_TRUE(GetBool(expression)) << expression;
55 void JSChecker::ExpectFalse(const std::string& expression) {
56 EXPECT_FALSE(GetBool(expression)) << expression;
59 void JSChecker::ExpectEQ(const std::string& expression, int result) {
60 EXPECT_EQ(GetInt(expression), result) << expression;
63 void JSChecker::ExpectNE(const std::string& expression, int result) {
64 EXPECT_NE(GetInt(expression), result) << expression;
67 void JSChecker::ExpectEQ(const std::string& expression,
69 EXPECT_EQ(GetString(expression), result) << expression;
72 void JSChecker::ExpectNE(const std::string& expression,
74 EXPECT_NE(GetString(expression), result) << expression;
77 void JSChecker::GetBoolImpl(const std::string& expression, bool* result) {
80 "!!" + WrapSend(expression),
84 void JSChecker::GetIntImpl(const std::string& expression, int* result) {
87 WrapSend(expression),
91 void JSChecker::GetStringImpl(const std::string& expression,
95 WrapSend(expression),