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

Unified Diff: Source/core/testing/Internals.js

Issue 362993004: Implement Blink-in-JS for DOM attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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: Source/core/testing/Internals.js
diff --git a/Source/core/testing/Internals.js b/Source/core/testing/Internals.js
index a30335c74888ed9367e021155b1246dc56ad6e07..7e53aa188ea5dabafd57556b96660dd495de56df 100644
--- a/Source/core/testing/Internals.js
+++ b/Source/core/testing/Internals.js
@@ -7,6 +7,12 @@
installClass("Internals", function(global) {
var InternalsPrototype = Object.create(Element.prototype);
+ InternalsPrototype.constructor = function() {
+ this.m_shortAttribute = -1;
+ this.m_stringAttribute = "xxx";
+ this.m_nodeAttribute = null;
+ }
+
InternalsPrototype.doNothing = function() {
}
@@ -85,5 +91,24 @@ installClass("Internals", function(global) {
node.dispatchEvent(event);
}
+ Object.defineProperty(InternalsPrototype, "readonlyShortAttribute", {
+ get: function() { return 123; }
+ });
+
+ Object.defineProperty(InternalsPrototype, "shortAttribute", {
+ get: function() { return this.m_shortAttribute; },
+ set: function(value) { this.m_shortAttribute = value; }
+ });
+
+ Object.defineProperty(InternalsPrototype, "stringAttribute", {
+ get: function() { return this.m_stringAttribute; },
+ set: function(value) { this.m_stringAttribute = value; }
+ });
+
+ Object.defineProperty(InternalsPrototype, "nodeAttribute", {
+ get: function() { return this.m_nodeAttribute; },
+ set: function(value) { this.m_nodeAttribute = value; }
+ });
+
return InternalsPrototype;
});
« Source/bindings/core/v8/PrivateScriptRunner.cpp ('K') | « Source/core/testing/Internals.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698