OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "config.h" |
| 6 #include "core/page/PagePopupClient.h" |
| 7 |
| 8 #include <gtest/gtest.h> |
| 9 #include <string> |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 TEST(PagePopupClientTest, AddJavaScriptString) |
| 14 { |
| 15 RefPtr<SharedBuffer> buffer = SharedBuffer::create(); |
| 16 PagePopupClient::addJavaScriptString("abc\r\n'\"</script>", buffer.get()); |
| 17 EXPECT_EQ("\"abc\\r\\n'\\\"\\x3C/script>\"", std::string(buffer->data(), buf
fer->size())); |
| 18 } |
| 19 |
| 20 } // namespace blink |
| 21 |
OLD | NEW |