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/files/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" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 // |args| are passed through the various JavaScript logging functions such as | 16 // |args| are passed through the various JavaScript logging functions such as |
17 // console.log. Returns a string appropriate for logging with LOG(severity). | 17 // console.log. Returns a string appropriate for logging with LOG(severity). |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 v8::Handle<v8::Array> testResult(args[1].As<v8::Array>()); | 296 v8::Handle<v8::Array> testResult(args[1].As<v8::Array>()); |
297 EXPECT_EQ(2U, testResult->Length()); | 297 EXPECT_EQ(2U, testResult->Length()); |
298 if (::testing::Test::HasNonfatalFailure()) | 298 if (::testing::Test::HasNonfatalFailure()) |
299 return; | 299 return; |
300 testResult_ok = testResult->Get(0)->BooleanValue(); | 300 testResult_ok = testResult->Get(0)->BooleanValue(); |
301 if (!testResult_ok) { | 301 if (!testResult_ok) { |
302 v8::String::Utf8Value message(testResult->Get(1)); | 302 v8::String::Utf8Value message(testResult->Get(1)); |
303 LOG(ERROR) << *message; | 303 LOG(ERROR) << *message; |
304 } | 304 } |
305 } | 305 } |
OLD | NEW |