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

Side by Side Diff: chrome/test/ui/ui_test.h

Issue 165168: Test startup of new tab page with a complex theme.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « chrome/test/startup/startup_test.cc ('k') | chrome/test/ui/ui_test.cc » ('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 (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_TEST_UI_UI_TEST_H_ 5 #ifndef CHROME_TEST_UI_UI_TEST_H_
6 #define CHROME_TEST_UI_UI_TEST_H_ 6 #define CHROME_TEST_UI_UI_TEST_H_
7 7
8 // This file provides a common base for running UI unit tests, which operate 8 // This file provides a common base for running UI unit tests, which operate
9 // the entire browser application in a separate process for holistic 9 // the entire browser application in a separate process for holistic
10 // functional testing. 10 // functional testing.
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 static std::wstring js_flags() { return js_flags_; } 331 static std::wstring js_flags() { return js_flags_; }
332 static void set_js_flags(const std::wstring& value) { 332 static void set_js_flags(const std::wstring& value) {
333 js_flags_ = value; 333 js_flags_ = value;
334 } 334 }
335 335
336 static std::wstring log_level() { return log_level_; } 336 static std::wstring log_level() { return log_level_; }
337 static void set_log_level(const std::wstring& value) { 337 static void set_log_level(const std::wstring& value) {
338 log_level_ = value; 338 log_level_ = value;
339 } 339 }
340 340
341 // Returns the directory name where the "typical" user data is that we use
342 // for testing.
343 static FilePath ComputeTypicalUserDataSource(int profile_type);
344
341 // Called by some tests that wish to have a base profile to start from. This 345 // Called by some tests that wish to have a base profile to start from. This
342 // "user data directory" (containing one or more profiles) will be recursively 346 // "user data directory" (containing one or more profiles) will be recursively
343 // copied into the user data directory for the test and the files will be 347 // copied into the user data directory for the test and the files will be
344 // evicted from the OS cache. To start with a blank profile, supply an empty 348 // evicted from the OS cache. To start with a blank profile, supply an empty
345 // string (the default). 349 // string (the default).
346 std::wstring template_user_data() const { return template_user_data_; } 350 std::wstring template_user_data() const { return template_user_data_; }
347 void set_template_user_data(const std::wstring& template_user_data) { 351 void set_template_user_data(const std::wstring& template_user_data) {
348 template_user_data_ = template_user_data; 352 template_user_data_ = template_user_data;
349 } 353 }
350 354
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // error. 401 // error.
398 // Apparently needed for Windows buildbots (to workaround an error when 402 // Apparently needed for Windows buildbots (to workaround an error when
399 // file is in use). 403 // file is in use).
400 // TODO(phajdan.jr): Move to test_file_util if we need it in more places. 404 // TODO(phajdan.jr): Move to test_file_util if we need it in more places.
401 bool EvictFileFromSystemCacheWrapper(const FilePath& path); 405 bool EvictFileFromSystemCacheWrapper(const FilePath& path);
402 406
403 // Synchronously launches local http server normally used to run LayoutTests. 407 // Synchronously launches local http server normally used to run LayoutTests.
404 void StartHttpServer(const FilePath& root_directory); 408 void StartHttpServer(const FilePath& root_directory);
405 void StopHttpServer(); 409 void StopHttpServer();
406 410
411 // Profile theme type choices.
412 enum {
413 DEFAULT_THEME = 0,
414 COMPLEX_THEME = 1
415 } ProfileType;
416
407 private: 417 private:
408 // Check that no processes related to Chrome exist, displaying 418 // Check that no processes related to Chrome exist, displaying
409 // the given message if any do. 419 // the given message if any do.
410 void AssertAppNotRunning(const std::wstring& error_message); 420 void AssertAppNotRunning(const std::wstring& error_message);
411 421
412 // Common functionality for the public PrintResults methods. 422 // Common functionality for the public PrintResults methods.
413 void PrintResultsImpl(const std::string& measurement, 423 void PrintResultsImpl(const std::string& measurement,
414 const std::string& modifier, 424 const std::string& modifier,
415 const std::string& trace, 425 const std::string& trace,
416 const std::string& values, 426 const std::string& values,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 #ifdef UNIT_TEST 519 #ifdef UNIT_TEST
510 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); 520 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr);
511 521
512 template<typename T> 522 template<typename T>
513 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { 523 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) {
514 return out << ptr.get(); 524 return out << ptr.get();
515 } 525 }
516 #endif // UNIT_TEST 526 #endif // UNIT_TEST
517 527
518 #endif // CHROME_TEST_UI_UI_TEST_H_ 528 #endif // CHROME_TEST_UI_UI_TEST_H_
OLDNEW
« no previous file with comments | « chrome/test/startup/startup_test.cc ('k') | chrome/test/ui/ui_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698