1e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)// found in the LICENSE file. 4e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 5e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)"use strict"; 6e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 7e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)installClass("PrivateScriptTest", function(PrivateScriptTestPrototype) { 8e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 9e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) PrivateScriptTestPrototype.addIntegerInPartial = function(value1, value2) { 10e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) return value1 + value2; 11e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) } 12e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 13e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) PrivateScriptTestPrototype.addInteger2InPartial = function(value1, value2) { 14e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) // addValue_ is a method defined in PrivateScriptTest.js. 15e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) // Partial interfaces should be able to use methods defined in the base interface. 16e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) return this.addValues_(value1, value2); 17e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) } 18e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 19e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) Object.defineProperty(PrivateScriptTestPrototype, "stringAttributeInPartial", { 20e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) get: function() { return this.m_stringAttributeInPartial; }, 21e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) set: function(value) { this.m_stringAttributeInPartial = value; } 22e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) }); 23e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles) 24e38fbeeb576b5094e34e038ab88d9d6a5c5c2214Torne (Richard Coles)}); 25