Index: gin/test/file_unittests.js |
diff --git a/gin/test/file_unittests.js b/gin/test/file_unittests.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9217ade02fe4bb23ec0b5db03d161a5f88d15e46 |
--- /dev/null |
+++ b/gin/test/file_unittests.js |
@@ -0,0 +1,25 @@ |
+// 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. |
+ |
+define([ |
+ "gin/test/expect", |
+ "file" |
+ ], function(expect, file) { |
+ |
+ function isString(x) { |
+ return toString.call(x) === '[object String]' |
+ } |
+ |
+ var rootDir = file.getSourceRootDirectory(); |
+ expect(isString(rootDir)).toBeTruthy(); |
+ |
+ var files = file.getFilesInDirectory(rootDir); |
+ expect(Array.isArray(files)).toBeTruthy(); |
+ |
+ var owners = file.readFileToString(rootDir + "/OWNERS"); |
+ expect(isString(owners)).toBeTruthy(); |
+ expect(owners.length).toBeGreaterThan(0); |
+ |
+ this.result = "PASS"; |
+}); |