| 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) { |
| 8 var InternalsPrototype = Object.create(Element.prototype); | 8 var InternalsPrototype = Object.create(Element.prototype); |
| 9 | 9 |
| 10 InternalsPrototype.constructor = function() { | 10 InternalsPrototype.initialize = function() { |
| 11 this.m_shortAttribute = -1; | 11 this.m_shortAttribute = -1; |
| 12 this.m_stringAttribute = "xxx"; | 12 this.m_stringAttribute = "xxx"; |
| 13 this.m_nodeAttribute = null; | 13 this.m_nodeAttribute = null; |
| 14 } | 14 } |
| 15 | 15 |
| 16 InternalsPrototype.doNothing = function() { | 16 InternalsPrototype.doNothing = function() { |
| 17 } | 17 } |
| 18 | 18 |
| 19 InternalsPrototype.return123 = function() { | 19 InternalsPrototype.return123 = function() { |
| 20 return 123; | 20 return 123; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 get: function() { throw new DOMExceptionInPrivateScript("IndexSizeError"
, "getter threw error"); }, | 114 get: function() { throw new DOMExceptionInPrivateScript("IndexSizeError"
, "getter threw error"); }, |
| 115 set: function(value) { throw new DOMExceptionInPrivateScript("IndexSizeE
rror", "setter threw error"); } | 115 set: function(value) { throw new DOMExceptionInPrivateScript("IndexSizeE
rror", "setter threw error"); } |
| 116 }); | 116 }); |
| 117 | 117 |
| 118 InternalsPrototype.voidMethodThrowsSyntaxError = function() { | 118 InternalsPrototype.voidMethodThrowsSyntaxError = function() { |
| 119 throw new DOMExceptionInPrivateScript("SyntaxError", "method threw error
"); | 119 throw new DOMExceptionInPrivateScript("SyntaxError", "method threw error
"); |
| 120 } | 120 } |
| 121 | 121 |
| 122 return InternalsPrototype; | 122 return InternalsPrototype; |
| 123 }); | 123 }); |
| OLD | NEW |