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

Side by Side Diff: chrome/test/chromedriver/chrome_launcher.cc

Issue 23464065: [chromedriver] Use data:, instead of about:blank for the start page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromedriver/chrome_launcher.h" 5 #include "chrome/test/chromedriver/chrome_launcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 for (std::set<std::string>::const_iterator iter = 109 for (std::set<std::string>::const_iterator iter =
110 capabilities.exclude_switches.begin(); 110 capabilities.exclude_switches.begin();
111 iter != capabilities.exclude_switches.end(); 111 iter != capabilities.exclude_switches.end();
112 ++iter) { 112 ++iter) {
113 switches.RemoveSwitch(*iter); 113 switches.RemoveSwitch(*iter);
114 } 114 }
115 switches.SetFromSwitches(capabilities.switches); 115 switches.SetFromSwitches(capabilities.switches);
116 116
117 if (!switches.HasSwitch("user-data-dir")) { 117 if (!switches.HasSwitch("user-data-dir")) {
118 command.AppendArg("about:blank"); 118 command.AppendArg("data:,");
119 if (!user_data_dir->CreateUniqueTempDir()) 119 if (!user_data_dir->CreateUniqueTempDir())
120 return Status(kUnknownError, "cannot create temp dir for user data dir"); 120 return Status(kUnknownError, "cannot create temp dir for user data dir");
121 switches.SetSwitch("user-data-dir", user_data_dir->path().value()); 121 switches.SetSwitch("user-data-dir", user_data_dir->path().value());
122 Status status = internal::PrepareUserDataDir( 122 Status status = internal::PrepareUserDataDir(
123 user_data_dir->path(), capabilities.prefs.get(), 123 user_data_dir->path(), capabilities.prefs.get(),
124 capabilities.local_state.get()); 124 capabilities.local_state.get());
125 if (status.IsError()) 125 if (status.IsError())
126 return status; 126 return status;
127 } 127 }
128 128
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 // Write empty "First Run" file, otherwise Chrome will wipe the default 593 // Write empty "First Run" file, otherwise Chrome will wipe the default
594 // profile that was written. 594 // profile that was written.
595 if (file_util::WriteFile( 595 if (file_util::WriteFile(
596 user_data_dir.AppendASCII("First Run"), "", 0) != 0) { 596 user_data_dir.AppendASCII("First Run"), "", 0) != 0) {
597 return Status(kUnknownError, "failed to write first run file"); 597 return Status(kUnknownError, "failed to write first run file");
598 } 598 }
599 return Status(kOk); 599 return Status(kOk);
600 } 600 }
601 601
602 } // namespace internal 602 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome/adb_impl.cc ('k') | chrome/test/chromedriver/test/run_py_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698