Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Side by Side Diff: components/test_runner/test_common.cc

Issue 1931833003: Moving TestRunnerForSpecificView into a separate compilation unit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/test_runner/test_common.h ('k') | components/test_runner/test_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/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"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 return kPolicyNewForegroundTab; 92 return kPolicyNewForegroundTab;
93 case blink::WebNavigationPolicyNewWindow: 93 case blink::WebNavigationPolicyNewWindow:
94 return kPolicyNewWindow; 94 return kPolicyNewWindow;
95 case blink::WebNavigationPolicyNewPopup: 95 case blink::WebNavigationPolicyNewPopup:
96 return kPolicyNewPopup; 96 return kPolicyNewPopup;
97 default: 97 default:
98 return kIllegalString; 98 return kIllegalString;
99 } 99 }
100 } 100 }
101 101
102 blink::WebString V8StringToWebString(v8::Local<v8::String> v8_str) {
103 int length = v8_str->Utf8Length() + 1;
104 std::unique_ptr<char[]> chars(new char[length]);
105 v8_str->WriteUtf8(chars.get(), length);
106 return blink::WebString::fromUTF8(chars.get());
107 }
108
102 void EnsureBlinkInitialized() { 109 void EnsureBlinkInitialized() {
103 g_mock_blink_platform.Get(); 110 g_mock_blink_platform.Get();
104 } 111 }
105 112
106 } // namespace test_runner 113 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/test_common.h ('k') | components/test_runner/test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698