| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 installClass("PrivateScriptTest", function(global) { | 7 installClass("PrivateScriptTest", function(global, InternalsPrototype) { |
| 8 var InternalsPrototype = Object.create(Element.prototype); | |
| 9 | 8 |
| 10 InternalsPrototype.initialize = function() { | 9 InternalsPrototype.initialize = function() { |
| 11 this.m_shortAttribute = -1; | 10 this.m_shortAttribute = -1; |
| 12 this.m_stringAttribute = "xxx"; | 11 this.m_stringAttribute = "xxx"; |
| 13 this.m_nodeAttribute = null; | 12 this.m_nodeAttribute = null; |
| 14 this.m_stringAttributeForPrivateScriptOnly = "yyy"; | 13 this.m_stringAttributeForPrivateScriptOnly = "yyy"; |
| 15 } | 14 } |
| 16 | 15 |
| 17 InternalsPrototype.doNothing = function() { | 16 InternalsPrototype.doNothing = function() { |
| 18 } | 17 } |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 120 } |
| 122 | 121 |
| 123 InternalsPrototype.addIntegerForPrivateScriptOnly = function(value1, value2)
{ | 122 InternalsPrototype.addIntegerForPrivateScriptOnly = function(value1, value2)
{ |
| 124 return value1 + value2; | 123 return value1 + value2; |
| 125 } | 124 } |
| 126 | 125 |
| 127 Object.defineProperty(InternalsPrototype, "stringAttributeForPrivateScriptOn
ly", { | 126 Object.defineProperty(InternalsPrototype, "stringAttributeForPrivateScriptOn
ly", { |
| 128 get: function() { return this.m_stringAttributeForPrivateScriptOnly; }, | 127 get: function() { return this.m_stringAttributeForPrivateScriptOnly; }, |
| 129 set: function(value) { this.m_stringAttributeForPrivateScriptOnly = valu
e; } | 128 set: function(value) { this.m_stringAttributeForPrivateScriptOnly = valu
e; } |
| 130 }); | 129 }); |
| 131 | |
| 132 return InternalsPrototype; | |
| 133 }); | 130 }); |
| OLD | NEW |