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

Unified Diff: third_party/WebKit/Source/core/testing/Internals.h

Issue 2683853005: bindings: Make some value iterator properties aliases to Array.prototype functions (Closed)
Patch Set: Patch v2: IDLs and test expectations adjusted Created 3 years, 10 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/Internals.h
diff --git a/third_party/WebKit/Source/core/testing/Internals.h b/third_party/WebKit/Source/core/testing/Internals.h
index 1d5f541d0d9f6374372e8647c444684a14b4fefd..cd1a362c998eb32f51eda9d015041f8109517ba0 100644
--- a/third_party/WebKit/Source/core/testing/Internals.h
+++ b/third_party/WebKit/Source/core/testing/Internals.h
@@ -28,7 +28,6 @@
#define Internals_h
#include "bindings/core/v8/ExceptionState.h"
-#include "bindings/core/v8/Iterable.h"
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
@@ -48,6 +47,8 @@ class ClientRect;
class ClientRectList;
class DOMArrayBuffer;
class DOMPoint;
+class DOMWindow;
+class Dictionary;
class DictionaryTest;
class Document;
class DocumentMarker;
@@ -77,8 +78,7 @@ class StaticNodeTypeList;
using StaticNodeList = StaticNodeTypeList<Node>;
class Internals final : public GarbageCollected<Internals>,
- public ScriptWrappable,
- public ValueIterable<int> {
+ public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
@@ -493,6 +493,12 @@ class Internals final : public GarbageCollected<Internals>,
bool isUseCounted(Document*, int useCounterId);
bool isCSSPropertyUseCounted(Document*, const String&);
+ // Used by the iterable<>.
+ constexpr unsigned length() const { return 5; }
+ constexpr int anonymousIndexedGetter(uint32_t index) const {
+ return index * index;
+ }
+
String unscopableAttribute();
String unscopableMethod();
@@ -541,8 +547,6 @@ class Internals final : public GarbageCollected<Internals>,
ExceptionState&);
Member<InternalRuntimeFlags> m_runtimeFlags;
Member<Document> m_document;
-
- IterationSource* startIteration(ScriptState*, ExceptionState&) override;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698