| Index: Source/core/testing/PrivateScriptTest.js
|
| diff --git a/Source/core/testing/PrivateScriptTest.js b/Source/core/testing/PrivateScriptTest.js
|
| index 95a64d626e76acb47c445c635334d970840c765f..b3692ef3ccf72d00169a4ddb06c1ac394ba14466 100644
|
| --- a/Source/core/testing/PrivateScriptTest.js
|
| +++ b/Source/core/testing/PrivateScriptTest.js
|
| @@ -4,164 +4,164 @@
|
|
|
| "use strict";
|
|
|
| -installClass("PrivateScriptTest", function(global, InternalsPrototype) {
|
| +installClass("PrivateScriptTest", function(global, PrivateScriptTestPrototype) {
|
|
|
| - InternalsPrototype.initialize = function() {
|
| + PrivateScriptTestPrototype.initialize = function() {
|
| this.m_shortAttribute = -1;
|
| this.m_stringAttribute = "xxx";
|
| this.m_nodeAttribute = null;
|
| this.m_stringAttributeForPrivateScriptOnly = "yyy";
|
| }
|
|
|
| - InternalsPrototype.doNothing = function() {
|
| + PrivateScriptTestPrototype.doNothing = function() {
|
| }
|
|
|
| - InternalsPrototype.return123 = function() {
|
| + PrivateScriptTestPrototype.return123 = function() {
|
| return 123;
|
| }
|
|
|
| - InternalsPrototype.echoInteger = function(value) {
|
| + PrivateScriptTestPrototype.echoInteger = function(value) {
|
| return value;
|
| }
|
|
|
| - InternalsPrototype.echoString = function(value) {
|
| + PrivateScriptTestPrototype.echoString = function(value) {
|
| return value;
|
| }
|
|
|
| - InternalsPrototype.echoNode = function(value) {
|
| + PrivateScriptTestPrototype.echoNode = function(value) {
|
| return value;
|
| }
|
|
|
| - InternalsPrototype.addValues_ = function(value1, value2) {
|
| + PrivateScriptTestPrototype.addValues_ = function(value1, value2) {
|
| return value1 + value2;
|
| }
|
|
|
| - InternalsPrototype.addInteger = function(value1, value2) {
|
| + PrivateScriptTestPrototype.addInteger = function(value1, value2) {
|
| return this.addValues_(value1, value2);
|
| }
|
|
|
| - InternalsPrototype.addString = function(value1, value2) {
|
| + PrivateScriptTestPrototype.addString = function(value1, value2) {
|
| return this.addValues_(value1, value2);
|
| }
|
|
|
| - InternalsPrototype.setIntegerToDocument = function(document, value) {
|
| + PrivateScriptTestPrototype.setIntegerToDocument = function(document, value) {
|
| document.integer = value;
|
| }
|
|
|
| - InternalsPrototype.getIntegerFromDocument = function(document) {
|
| + PrivateScriptTestPrototype.getIntegerFromDocument = function(document) {
|
| return document.integer;
|
| }
|
|
|
| - InternalsPrototype.setIntegerToPrototype = function(value) {
|
| + PrivateScriptTestPrototype.setIntegerToPrototype = function(value) {
|
| this.integer = value;
|
| }
|
|
|
| - InternalsPrototype.getIntegerFromPrototype = function() {
|
| + PrivateScriptTestPrototype.getIntegerFromPrototype = function() {
|
| return this.integer;
|
| }
|
|
|
| - InternalsPrototype.createElement = function(document) {
|
| + PrivateScriptTestPrototype.createElement = function(document) {
|
| return document.createElement("div");
|
| }
|
|
|
| - InternalsPrototype.appendChild = function(node1, node2) {
|
| + PrivateScriptTestPrototype.appendChild = function(node1, node2) {
|
| node1.appendChild(node2);
|
| }
|
|
|
| - InternalsPrototype.firstChild = function(node) {
|
| + PrivateScriptTestPrototype.firstChild = function(node) {
|
| return node.firstChild;
|
| }
|
|
|
| - InternalsPrototype.nextSibling = function(node) {
|
| + PrivateScriptTestPrototype.nextSibling = function(node) {
|
| return node.nextSibling;
|
| }
|
|
|
| - InternalsPrototype.innerHTML = function(node) {
|
| + PrivateScriptTestPrototype.innerHTML = function(node) {
|
| return node.innerHTML;
|
| }
|
|
|
| - InternalsPrototype.setInnerHTML = function(node, string) {
|
| + PrivateScriptTestPrototype.setInnerHTML = function(node, string) {
|
| node.innerHTML = string;
|
| }
|
|
|
| - InternalsPrototype.addClickListener = function(node) {
|
| + PrivateScriptTestPrototype.addClickListener = function(node) {
|
| node.addEventListener("click", function () {
|
| node.innerHTML = "clicked";
|
| });
|
| }
|
|
|
| - InternalsPrototype.clickNode = function(document, node) {
|
| + PrivateScriptTestPrototype.clickNode = function(document, node) {
|
| var event = new MouseEvent("click", { bubbles: true, cancelable: true, view: global });
|
| node.dispatchEvent(event);
|
| }
|
|
|
| - Object.defineProperty(InternalsPrototype, "readonlyShortAttribute", {
|
| + Object.defineProperty(PrivateScriptTestPrototype, "readonlyShortAttribute", {
|
| get: function() { return 123; }
|
| });
|
|
|
| - Object.defineProperty(InternalsPrototype, "shortAttribute", {
|
| + Object.defineProperty(PrivateScriptTestPrototype, "shortAttribute", {
|
| get: function() { return this.m_shortAttribute; },
|
| set: function(value) { this.m_shortAttribute = value; }
|
| });
|
|
|
| - Object.defineProperty(InternalsPrototype, "stringAttribute", {
|
| + Object.defineProperty(PrivateScriptTestPrototype, "stringAttribute", {
|
| get: function() { return this.m_stringAttribute; },
|
| set: function(value) { this.m_stringAttribute = value; }
|
| });
|
|
|
| - Object.defineProperty(InternalsPrototype, "nodeAttribute", {
|
| + Object.defineProperty(PrivateScriptTestPrototype, "nodeAttribute", {
|
| get: function() { return this.m_nodeAttribute; },
|
| set: function(value) { this.m_nodeAttribute = value; }
|
| });
|
|
|
| - Object.defineProperty(InternalsPrototype, "nodeAttributeThrowsIndexSizeError", {
|
| + Object.defineProperty(PrivateScriptTestPrototype, "nodeAttributeThrowsIndexSizeError", {
|
| get: function() { throw new DOMExceptionInPrivateScript("IndexSizeError", "getter threw error"); },
|
| set: function(value) { throw new DOMExceptionInPrivateScript("IndexSizeError", "setter threw error"); }
|
| });
|
|
|
| - InternalsPrototype.voidMethodThrowsDOMSyntaxError = function() {
|
| + PrivateScriptTestPrototype.voidMethodThrowsDOMSyntaxError = function() {
|
| throw new DOMExceptionInPrivateScript("SyntaxError", "method threw error");
|
| }
|
|
|
| - InternalsPrototype.voidMethodThrowsError = function() {
|
| + PrivateScriptTestPrototype.voidMethodThrowsError = function() {
|
| throw new Error("method threw Error");
|
| }
|
|
|
| - InternalsPrototype.voidMethodThrowsTypeError = function() {
|
| + PrivateScriptTestPrototype.voidMethodThrowsTypeError = function() {
|
| throw new TypeError("method threw TypeError");
|
| }
|
|
|
| - InternalsPrototype.voidMethodThrowsRangeError = function() {
|
| + PrivateScriptTestPrototype.voidMethodThrowsRangeError = function() {
|
| throw new RangeError("method threw RangeError");
|
| }
|
|
|
| - InternalsPrototype.voidMethodThrowsSyntaxError = function() {
|
| + PrivateScriptTestPrototype.voidMethodThrowsSyntaxError = function() {
|
| throw new SyntaxError("method threw SyntaxError");
|
| }
|
|
|
| - InternalsPrototype.voidMethodThrowsReferenceError = function() {
|
| + PrivateScriptTestPrototype.voidMethodThrowsReferenceError = function() {
|
| throw new ReferenceError("method threw ReferenceError");
|
| }
|
|
|
| - InternalsPrototype.voidMethodWithStackOverflow = function() {
|
| + PrivateScriptTestPrototype.voidMethodWithStackOverflow = function() {
|
| function f() { f(); }
|
| f();
|
| }
|
|
|
| - InternalsPrototype.addIntegerForPrivateScriptOnly = function(value1, value2) {
|
| + PrivateScriptTestPrototype.addIntegerForPrivateScriptOnly = function(value1, value2) {
|
| return value1 + value2;
|
| }
|
|
|
| - Object.defineProperty(InternalsPrototype, "stringAttributeForPrivateScriptOnly", {
|
| + Object.defineProperty(PrivateScriptTestPrototype, "stringAttributeForPrivateScriptOnly", {
|
| get: function() { return this.m_stringAttributeForPrivateScriptOnly; },
|
| set: function(value) { this.m_stringAttributeForPrivateScriptOnly = value; }
|
| });
|
|
|
| - InternalsPrototype.addIntegerImplementedInCPP = function(value1, value2) {
|
| + PrivateScriptTestPrototype.addIntegerImplementedInCPP = function(value1, value2) {
|
| return this.addIntegerImplementedInCPPForPrivateScriptOnly(value1, value2);
|
| }
|
|
|
| - Object.defineProperty(InternalsPrototype, "stringAttributeImplementedInCPP", {
|
| + Object.defineProperty(PrivateScriptTestPrototype, "stringAttributeImplementedInCPP", {
|
| get: function() { return this.m_stringAttributeImplementedInCPPForPrivateScriptOnly; },
|
| set: function(value) { this.m_stringAttributeImplementedInCPPForPrivateScriptOnly = value; }
|
| });
|
|
|