void nsMathMLTokenFrame::SetQuotes(bool aNotify) { if (mContent->Tag() != nsGkAtoms::ms_) return; nsAutoString value; // lquote if (GetAttribute(mContent, mPresentationData.mstyle, nsGkAtoms::lquote_, value)) { SetQuote(nsLayoutUtils::GetBeforeFrame(this), value, aNotify); } // rquote if (GetAttribute(mContent, mPresentationData.mstyle, nsGkAtoms::rquote_, value)) { SetQuote(nsLayoutUtils::GetAfterFrame(this), value, aNotify); } }
TEST_F(TestEscapeJSON, Quoted) { SetQuote(true); { SCOPED_TRACE("Simple #11"); const uint8_t in[] = "\0"; const char out[] = "\"\\u0000\""; RunTest(in, sizeof(in)-1, out); } }
TEST_F(TestEscapeJSON, Quoted) { SetQuote(true); { SCOPED_TRACE("Simple #1"); RunTest("/", "\"\\/\""); } { SCOPED_TRACE("Simple #2"); RunTest("\"", "\"\\\"\""); } { SCOPED_TRACE("Simple #3"); RunTest("'", "\"'\""); } { SCOPED_TRACE("Simple #4"); RunTest("\"", "\"\\\"\""); } { SCOPED_TRACE("Simple #5"); RunTest("\\", "\"\\\\\""); } { SCOPED_TRACE("Simple #6"); RunTest("\b", "\"\\b\""); } { SCOPED_TRACE("Simple #7"); RunTest("\f", "\"\\f\""); } { SCOPED_TRACE("Simple #8"); RunTest("\n", "\"\\n\""); } { SCOPED_TRACE("Simple #9"); RunTest("\r", "\"\\r\""); } { SCOPED_TRACE("Simple #10"); RunTest("\t", "\"\\t\""); } { SCOPED_TRACE("Simple #11"); const uint8_t in[] = "\0"; const char out[] = "\"\\u0000\""; RunTest(in, sizeof(in)-1, out); } }
TestEscapeJSONCStringsQuoted() { SetQuote(true); }