| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/test/base/v8_unit_test.h" | 5 #include "chrome/test/base/v8_unit_test.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 mockPath = mockPath.AppendASCII("chrome"); | 137 mockPath = mockPath.AppendASCII("chrome"); |
| 138 mockPath = mockPath.AppendASCII("third_party"); | 138 mockPath = mockPath.AppendASCII("third_party"); |
| 139 mockPath = mockPath.AppendASCII("mock4js"); | 139 mockPath = mockPath.AppendASCII("mock4js"); |
| 140 mockPath = mockPath.AppendASCII("mock4js.js"); | 140 mockPath = mockPath.AppendASCII("mock4js.js"); |
| 141 AddLibrary(mockPath); | 141 AddLibrary(mockPath); |
| 142 | 142 |
| 143 base::FilePath accessibilityAuditPath; | 143 base::FilePath accessibilityAuditPath; |
| 144 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &accessibilityAuditPath)); | 144 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &accessibilityAuditPath)); |
| 145 accessibilityAuditPath = accessibilityAuditPath.AppendASCII("third_party"); | 145 accessibilityAuditPath = accessibilityAuditPath.AppendASCII("third_party"); |
| 146 accessibilityAuditPath = | 146 accessibilityAuditPath = |
| 147 accessibilityAuditPath.AppendASCII("accessibility-developer-tools"); | 147 accessibilityAuditPath.AppendASCII("accessibility-audit"); |
| 148 accessibilityAuditPath = accessibilityAuditPath.AppendASCII("gen"); | |
| 149 accessibilityAuditPath = accessibilityAuditPath.AppendASCII("axs_testing.js"); | 148 accessibilityAuditPath = accessibilityAuditPath.AppendASCII("axs_testing.js"); |
| 150 AddLibrary(accessibilityAuditPath); | 149 AddLibrary(accessibilityAuditPath); |
| 151 | 150 |
| 152 base::FilePath testApiPath; | 151 base::FilePath testApiPath; |
| 153 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &testApiPath)); | 152 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &testApiPath)); |
| 154 testApiPath = testApiPath.AppendASCII("webui"); | 153 testApiPath = testApiPath.AppendASCII("webui"); |
| 155 testApiPath = testApiPath.AppendASCII("test_api.js"); | 154 testApiPath = testApiPath.AppendASCII("test_api.js"); |
| 156 AddLibrary(testApiPath); | 155 AddLibrary(testApiPath); |
| 157 } | 156 } |
| 158 | 157 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 v8::Handle<v8::Array> testResult(args[1].As<v8::Array>()); | 276 v8::Handle<v8::Array> testResult(args[1].As<v8::Array>()); |
| 278 EXPECT_EQ(2U, testResult->Length()); | 277 EXPECT_EQ(2U, testResult->Length()); |
| 279 if (::testing::Test::HasNonfatalFailure()) | 278 if (::testing::Test::HasNonfatalFailure()) |
| 280 return; | 279 return; |
| 281 testResult_ok = testResult->Get(0)->BooleanValue(); | 280 testResult_ok = testResult->Get(0)->BooleanValue(); |
| 282 if (!testResult_ok) { | 281 if (!testResult_ok) { |
| 283 v8::String::Utf8Value message(testResult->Get(1)); | 282 v8::String::Utf8Value message(testResult->Get(1)); |
| 284 LOG(ERROR) << *message; | 283 LOG(ERROR) << *message; |
| 285 } | 284 } |
| 286 } | 285 } |
| OLD | NEW |