Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / page / PagePopupClientTest.cpp
blob9c2232f8a7bc0dfacfc0b4753e0f36ef2c22dc6d
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "config.h"
6 #include "core/page/PagePopupClient.h"
8 #include <gtest/gtest.h>
9 #include <string>
11 namespace blink {
13 TEST(PagePopupClientTest, AddJavaScriptString)
15 RefPtr<SharedBuffer> buffer = SharedBuffer::create();
16 PagePopupClient::addJavaScriptString(String::fromUTF8("abc\r\n'\"</script>\t\f\v\xE2\x80\xA8\xE2\x80\xA9"), buffer.get());
17 EXPECT_EQ("\"abc\\r\\n'\\\"\\x3C/script>\\u0009\\u000C\\u000B\\u2028\\u2029\"", std::string(buffer->data(), buffer->size()));
20 } // namespace blink