Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1326)

Unified Diff: Source/core/page/PagePopupClientTest.cpp

Issue 1151153004: Can't open <select> popup with an <option> text including "</script>". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/PagePopupClient.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/PagePopupClientTest.cpp
diff --git a/Source/core/page/PagePopupClientTest.cpp b/Source/core/page/PagePopupClientTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..90ff07ba5c2c8247d37e74e24288236e6ce19a67
--- /dev/null
+++ b/Source/core/page/PagePopupClientTest.cpp
@@ -0,0 +1,21 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "core/page/PagePopupClient.h"
+
+#include <gtest/gtest.h>
+#include <string>
+
+namespace blink {
+
+TEST(PagePopupClientTest, AddJavaScriptString)
+{
+ RefPtr<SharedBuffer> buffer = SharedBuffer::create();
+ PagePopupClient::addJavaScriptString("abc\r\n'\"</script>", buffer.get());
+ EXPECT_EQ("\"abc\\r\\n'\\\"\\x3C/script>\"", std::string(buffer->data(), buffer->size()));
+}
+
+} // namespace blink
+
« no previous file with comments | « Source/core/page/PagePopupClient.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698