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

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

Issue 376553004: Split out tests of private scripts from Internals to PrivateScriptTest (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
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/core/testing/PrivateScriptTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.js
diff --git a/Source/core/testing/Internals.js b/Source/core/testing/Internals.js
deleted file mode 100644
index 7e53aa188ea5dabafd57556b96660dd495de56df..0000000000000000000000000000000000000000
--- a/Source/core/testing/Internals.js
+++ /dev/null
@@ -1,114 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-"use strict";
-
-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() {
- }
-
- InternalsPrototype.return123 = function() {
- return 123;
- }
-
- InternalsPrototype.echoInteger = function(value) {
- return value;
- }
-
- InternalsPrototype.echoString = function(value) {
- return value;
- }
-
- InternalsPrototype.echoNode = function(value) {
- return value;
- }
-
- InternalsPrototype.addInteger = function(value1, value2) {
- return value1 + value2;
- }
-
- InternalsPrototype.addString = function(value1, value2) {
- return value1 + value2;
- }
-
- InternalsPrototype.setIntegerToDocument = function(document, value) {
- document.integer = value;
- }
-
- InternalsPrototype.getIntegerFromDocument = function(document) {
- return document.integer;
- }
-
- InternalsPrototype.setIntegerToPrototype = function(value) {
- this.integer = value;
- }
-
- InternalsPrototype.getIntegerFromPrototype = function() {
- return this.integer;
- }
-
- InternalsPrototype.createElement = function(document) {
- return document.createElement("div");
- }
-
- InternalsPrototype.appendChild = function(node1, node2) {
- node1.appendChild(node2);
- }
-
- InternalsPrototype.firstChild = function(node) {
- return node.firstChild;
- }
-
- InternalsPrototype.nextSibling = function(node) {
- return node.nextSibling;
- }
-
- InternalsPrototype.innerHTML = function(node) {
- return node.innerHTML;
- }
-
- InternalsPrototype.setInnerHTML = function(node, string) {
- node.innerHTML = string;
- }
-
- InternalsPrototype.addClickListener = function(node) {
- node.addEventListener("click", function () {
- node.innerHTML = "clicked";
- });
- }
-
- InternalsPrototype.clickNode = function(document, node) {
- var event = new MouseEvent("click", { bubbles: true, cancelable: true, view: 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;
-});
« no previous file with comments | « Source/core/testing/Internals.idl ('k') | Source/core/testing/PrivateScriptTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698