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

Side by Side Diff: chrome/test/pyautolib/pyautolib.cc

Issue 197283023: Fix wide/ASCII conversion for CrOS testing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/base_paths.h" 5 #include "base/base_paths.h"
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 28 matching lines...) Expand all
39 void PyUITestSuiteBase::SetCrSourceRoot(const base::FilePath& path) { 39 void PyUITestSuiteBase::SetCrSourceRoot(const base::FilePath& path) {
40 PathService::Override(base::DIR_SOURCE_ROOT, path); 40 PathService::Override(base::DIR_SOURCE_ROOT, path);
41 } 41 }
42 42
43 bool PyUITestSuiteBase::IsBrowserTestSuite() { return true; } 43 bool PyUITestSuiteBase::IsBrowserTestSuite() { return true; }
44 44
45 // PyUITestBase 45 // PyUITestBase
46 PyUITestBase::PyUITestBase(bool clear_profile, std::wstring homepage) 46 PyUITestBase::PyUITestBase(bool clear_profile, std::wstring homepage)
47 : UITestBase() { 47 : UITestBase() {
48 set_clear_profile(clear_profile); 48 set_clear_profile(clear_profile);
49 set_homepage(base::UTF16ToASCII(homepage)); 49 set_homepage(base::WideToUTF8(homepage));
50 // We add this so that pyauto can execute javascript in the renderer and 50 // We add this so that pyauto can execute javascript in the renderer and
51 // read values back. 51 // read values back.
52 dom_automation_enabled_ = true; 52 dom_automation_enabled_ = true;
53 message_loop_ = GetSharedMessageLoop(base::MessageLoop::TYPE_DEFAULT); 53 message_loop_ = GetSharedMessageLoop(base::MessageLoop::TYPE_DEFAULT);
54 } 54 }
55 55
56 PyUITestBase::~PyUITestBase() { 56 PyUITestBase::~PyUITestBase() {
57 } 57 }
58 58
59 // static, refer .h for why it needs to be static 59 // static, refer .h for why it needs to be static
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 base::StringPrintf("Chrome automation timed out after %d seconds", 156 base::StringPrintf("Chrome automation timed out after %d seconds",
157 static_cast<int>(duration.InSeconds())), 157 static_cast<int>(duration.InSeconds())),
158 request, true, response); 158 request, true, response);
159 } else { 159 } else {
160 // TODO(craigdh): Determine specific cause. 160 // TODO(craigdh): Determine specific cause.
161 ErrorResponse( 161 ErrorResponse(
162 "Chrome automation failed prior to timing out, did chrome crash?", 162 "Chrome automation failed prior to timing out, did chrome crash?",
163 request, false, response); 163 request, false, response);
164 } 164 }
165 } 165 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698