Home | History | Annotate | Download | only in http

Lines Matching refs:parser

676 void CheckCurrentNameValuePair(HttpUtil::NameValuePairsIterator* parser,
680 ASSERT_EQ(expect_valid, parser->valid());
688 std::string::const_iterator first_value_begin = parser->value_begin();
689 std::string::const_iterator first_value_end = parser->value_end();
691 ASSERT_EQ(expected_name, std::string(parser->name_begin(),
692 parser->name_end()));
693 ASSERT_EQ(expected_name, parser->name());
694 ASSERT_EQ(expected_value, std::string(parser->value_begin(),
695 parser->value_end()));
696 ASSERT_EQ(expected_value, parser->value());
699 ASSERT_TRUE(first_value_begin == parser->value_begin());
700 ASSERT_TRUE(first_value_end == parser->value_end());
703 void CheckNextNameValuePair(HttpUtil::NameValuePairsIterator* parser,
708 ASSERT_EQ(expect_next, parser->GetNext());
709 ASSERT_EQ(expect_valid, parser->valid());
714 CheckCurrentNameValuePair(parser,
749 // ...but the parser is in an invalid state.
792 HttpUtil::NameValuePairsIterator parser(data.begin(), data.end(), ';');
794 EXPECT_TRUE(parser.valid());
796 CheckNextNameValuePair(&parser, false, true, "", ""));
804 HttpUtil::NameValuePairsIterator parser(data.begin(), data.end(), ';');
805 EXPECT_TRUE(parser.valid());
808 CheckNextNameValuePair(&parser, true, true, "alpha", "1"));
810 CheckNextNameValuePair(&parser, true, true, "beta", "2"));
812 CheckNextNameValuePair(&parser, true, true, "cappa", " 3; "));
814 CheckNextNameValuePair(&parser, true, true, "delta", " \"4\" "));
816 CheckNextNameValuePair(&parser, true, true, "e", " '5'"));
818 CheckNextNameValuePair(&parser, true, true, "e", "6"));
820 CheckNextNameValuePair(&parser, true, true, "f", "'hello world'"));
822 CheckNextNameValuePair(&parser, true, true, "g", ""));
824 CheckNextNameValuePair(&parser, true, true, "h", "hello"));
826 CheckNextNameValuePair(&parser, false, true, "", ""));
849 HttpUtil::NameValuePairsIterator parser(data.begin(), data.end(), ';');
850 EXPECT_TRUE(parser.valid());
853 CheckNextNameValuePair(&parser, true, true, "alpha", "1"));
855 CheckNextNameValuePair(&parser, true, true, "beta", "2"));
857 CheckNextNameValuePair(&parser, true, true, "cappa", "3"));
859 CheckNextNameValuePair(&parser, false, true, "", ""));
866 HttpUtil::NameValuePairsIterator parser(data.begin(), data.end(), ';');
867 EXPECT_TRUE(parser.valid());
870 CheckNextNameValuePair(&parser, true, true, "name", "value"));
872 CheckNextNameValuePair(&parser, false, true, "", ""));