| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "app/resource_bundle.h" | 5 #include "app/resource_bundle.h" |
| 6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/test/v8_unit_test.h" | 10 #include "chrome/test/v8_unit_test.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 FilePath test_js_file_path; | 41 FilePath test_js_file_path; |
| 42 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_js_file_path)); | 42 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_js_file_path)); |
| 43 test_js_file_path = test_js_file_path.AppendASCII("extensions"); | 43 test_js_file_path = test_js_file_path.AppendASCII("extensions"); |
| 44 test_js_file_path = test_js_file_path.AppendASCII(kJsonSchemaTest); | 44 test_js_file_path = test_js_file_path.AppendASCII(kJsonSchemaTest); |
| 45 std::string test_js; | 45 std::string test_js; |
| 46 ASSERT_TRUE(file_util::ReadFileToString(test_js_file_path, &test_js)); | 46 ASSERT_TRUE(file_util::ReadFileToString(test_js_file_path, &test_js)); |
| 47 ExecuteScriptInContext(test_js, kJsonSchemaTest); | 47 ExecuteScriptInContext(test_js, kJsonSchemaTest); |
| 48 } | 48 } |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 // TODO: Re-enable this test! http://crbug.com/22971 | 51 TEST_F(JsonSchemaTest, TestFormatError) { |
| 52 #if 0 | |
| 53 TEST_F(JsonSchemaTest, DISABLED_TestFormatError) { | |
| 54 TestFunction("testFormatError"); | 52 TestFunction("testFormatError"); |
| 55 } | 53 } |
| 56 | 54 |
| 57 TEST_F(JsonSchemaTest, DISABLED_TestComplex) { | 55 TEST_F(JsonSchemaTest, TestComplex) { |
| 58 TestFunction("testComplex"); | 56 TestFunction("testComplex"); |
| 59 } | 57 } |
| 60 | 58 |
| 61 TEST_F(JsonSchemaTest, DISABLED_TestEnum) { | 59 TEST_F(JsonSchemaTest, TestEnum) { |
| 62 TestFunction("testEnum"); | 60 TestFunction("testEnum"); |
| 63 } | 61 } |
| 64 | 62 |
| 65 TEST_F(JsonSchemaTest, DISABLED_TestExtends) { | 63 TEST_F(JsonSchemaTest, TestExtends) { |
| 66 TestFunction("testExtends"); | 64 TestFunction("testExtends"); |
| 67 } | 65 } |
| 68 | 66 |
| 69 TEST_F(JsonSchemaTest, DISABLED_TestObject) { | 67 TEST_F(JsonSchemaTest, TestObject) { |
| 70 TestFunction("testObject"); | 68 TestFunction("testObject"); |
| 71 } | 69 } |
| 72 | 70 |
| 73 TEST_F(JsonSchemaTest, DISABLED_TestArrayTuple) { | 71 TEST_F(JsonSchemaTest, TestArrayTuple) { |
| 74 TestFunction("testArrayTuple"); | 72 TestFunction("testArrayTuple"); |
| 75 } | 73 } |
| 76 | 74 |
| 77 TEST_F(JsonSchemaTest, DISABLED_TestArrayNonTuple) { | 75 TEST_F(JsonSchemaTest, TestArrayNonTuple) { |
| 78 TestFunction("testArrayNonTuple"); | 76 TestFunction("testArrayNonTuple"); |
| 79 } | 77 } |
| 80 | 78 |
| 81 TEST_F(JsonSchemaTest, DISABLED_TestString) { | 79 TEST_F(JsonSchemaTest, TestString) { |
| 82 TestFunction("testString"); | 80 TestFunction("testString"); |
| 83 } | 81 } |
| 84 | 82 |
| 85 TEST_F(JsonSchemaTest, DISABLED_TestNumber) { | 83 TEST_F(JsonSchemaTest, TestNumber) { |
| 86 TestFunction("testNumber"); | 84 TestFunction("testNumber"); |
| 87 } | 85 } |
| 88 | 86 |
| 89 TEST_F(JsonSchemaTest, DISABLED_TestType) { | 87 TEST_F(JsonSchemaTest, TestType) { |
| 90 TestFunction("testType"); | 88 TestFunction("testType"); |
| 91 } | 89 } |
| 92 | 90 |
| 93 TEST_F(JsonSchemaTest, DISABLED_TestTypeReference) { | 91 TEST_F(JsonSchemaTest, TestTypeReference) { |
| 94 TestFunction("testTypeReference"); | 92 TestFunction("testTypeReference"); |
| 95 } | 93 } |
| 96 #endif | |
| OLD | NEW |