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

Side by Side Diff: third_party/WebKit/Source/core/page/PagePopupClientTest.cpp

Issue 2941893002: DO NOT SUBMIT: results of old clang-format (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/page/PagePopupClient.h" 5 #include "core/page/PagePopupClient.h"
6 6
7 #include <string>
7 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
8 #include <string>
9 9
10 namespace blink { 10 namespace blink {
11 11
12 TEST(PagePopupClientTest, AddJavaScriptString) { 12 TEST(PagePopupClientTest, AddJavaScriptString) {
13 RefPtr<SharedBuffer> buffer = SharedBuffer::Create(); 13 RefPtr<SharedBuffer> buffer = SharedBuffer::Create();
14 PagePopupClient::AddJavaScriptString( 14 PagePopupClient::AddJavaScriptString(
15 String::FromUTF8("abc\r\n'\"</script>\t\f\v\xE2\x80\xA8\xE2\x80\xA9"), 15 String::FromUTF8("abc\r\n'\"</script>\t\f\v\xE2\x80\xA8\xE2\x80\xA9"),
16 buffer.Get()); 16 buffer.Get());
17 const Vector<char> contiguous = buffer->Copy(); 17 const Vector<char> contiguous = buffer->Copy();
18 EXPECT_EQ( 18 EXPECT_EQ(
19 "\"abc\\r\\n'\\\"\\x3C/script>\\u0009\\u000C\\u000B\\u2028\\u2029\"", 19 "\"abc\\r\\n'\\\"\\x3C/script>\\u0009\\u000C\\u000B\\u2028\\u2029\"",
20 std::string(contiguous.data(), contiguous.size())); 20 std::string(contiguous.data(), contiguous.size()));
21 } 21 }
22 22
23 } // namespace blink 23 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698