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

Unified Diff: chrome/test/data/extensions/json_schema_test.js

Issue 9584021: Improve implementation of isInstanceOf in JSONSchemaValidator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a test that cannot work anymore, update docs Created 8 years, 10 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
Index: chrome/test/data/extensions/json_schema_test.js
diff --git a/chrome/test/data/extensions/json_schema_test.js b/chrome/test/data/extensions/json_schema_test.js
index e66442f5959f7bc758ccc21e50df37cf42728b68..a87934bd4994b6b262e7077d893816d6b67a3b01 100644
--- a/chrome/test/data/extensions/json_schema_test.js
+++ b/chrome/test/data/extensions/json_schema_test.js
@@ -167,16 +167,6 @@ function testExtends() {
assertValid("", 43, schema);
}
-function ClassA() {
- this.a = "a";
-}
-function ClassB() {
-}
-ClassB.prototype = new ClassA();
-function ClassC() {
- this.a = "a";
-}
-
function testObject() {
var schema = {
properties: {
@@ -214,28 +204,6 @@ function testObject() {
assertValid("Object", {foo:"foo", bar:undefined}, schema);
assertNotValid("Object", {foo:"foo", bar:"42"}, schema,
[formatError("invalidType", ["integer", "string"])]);
-
- var classASchema = {
- properties: {
- "a": { type: "string" }
- },
- isInstanceOf: "ClassA"
- };
-
- var classBSchema = {
- properties: {},
- isInstanceOf: "ClassB"
- };
-
- var a = new ClassA();
- var b = new ClassB();
- var c = new ClassC();
-
- assertValid("Object", a, classASchema);
- assertValid("Object", b, classBSchema);
- assertValid("Object", b, classASchema);
- assertNotValid("Object", c, classASchema,
- [formatError("notInstance", [classASchema.isInstanceOf])]);
}
function testTypeReference() {

Powered by Google App Engine
This is Rietveld 408576698