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

Unified Diff: third_party/WebKit/Source/core/testing/SequenceTest.cpp

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests Created 3 years, 8 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
Index: third_party/WebKit/Source/core/testing/SequenceTest.cpp
diff --git a/third_party/WebKit/Source/core/testing/SequenceTest.cpp b/third_party/WebKit/Source/core/testing/SequenceTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..791644da730c208366ede2174f98f833162506c7
--- /dev/null
+++ b/third_party/WebKit/Source/core/testing/SequenceTest.cpp
@@ -0,0 +1,54 @@
+// Copyright 2017 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 "SequenceTest.h"
+
+namespace blink {
+
+SequenceTest::SequenceTest() {}
+
+SequenceTest::~SequenceTest() {}
+
+Vector<Vector<String>> SequenceTest::identityByteStringSequenceSequence(
+ const Vector<Vector<String>>& arg) const {
+ return arg;
+}
+
+Vector<double> SequenceTest::identityDoubleSequence(
+ const Vector<double>& arg) const {
+ return arg;
+}
+
+Vector<String> SequenceTest::identityFoodEnumSequence(
+ const Vector<String>& arg) const {
+ return arg;
+}
+
+Vector<int32_t> SequenceTest::identityLongSequence(
+ const Vector<int32_t>& arg) const {
+ return arg;
+}
+
+Nullable<Vector<uint8_t>> SequenceTest::identityOctetSequenceOrNull(
+ const Nullable<Vector<uint8_t>>& arg) const {
+ return arg;
+}
+
+HeapVector<Member<Element>> SequenceTest::getElementSequence() const {
+ return m_elementSequence;
+}
+
+void SequenceTest::setElementSequence(const HeapVector<Member<Element>>& arg) {
+ m_elementSequence = arg;
+}
+
+bool SequenceTest::unionReceivedSequence(const DoubleOrDoubleSequence& arg) {
+ return arg.isDoubleSequence();
+}
+
+DEFINE_TRACE(SequenceTest) {
+ visitor->Trace(m_elementSequence);
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/testing/SequenceTest.h ('k') | third_party/WebKit/Source/core/testing/SequenceTest.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698