OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/test_runner/test_common.h" | 5 #include "content/shell/test_runner/test_common.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
12 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 12 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 namespace test_runner { | 15 namespace test_runner { |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 } | 79 } |
80 | 80 |
81 blink::WebString V8StringToWebString(v8::Local<v8::String> v8_str) { | 81 blink::WebString V8StringToWebString(v8::Local<v8::String> v8_str) { |
82 int length = v8_str->Utf8Length() + 1; | 82 int length = v8_str->Utf8Length() + 1; |
83 std::unique_ptr<char[]> chars(new char[length]); | 83 std::unique_ptr<char[]> chars(new char[length]); |
84 v8_str->WriteUtf8(chars.get(), length); | 84 v8_str->WriteUtf8(chars.get(), length); |
85 return blink::WebString::fromUTF8(chars.get()); | 85 return blink::WebString::fromUTF8(chars.get()); |
86 } | 86 } |
87 | 87 |
88 } // namespace test_runner | 88 } // namespace test_runner |
OLD | NEW |