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

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

Issue 7259019: Move base/values.h into the base namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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/live_sync/live_preferences_sync_test.h ('k') | chrome/test/ui_test_utils.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 // This file provides a common base for running UI unit tests, which operate 9 // This file provides a common base for running UI unit tests, which operate
10 // the entire browser application in a separate process for holistic 10 // the entire browser application in a separate process for holistic
(...skipping 13 matching lines...) Expand all
24 #include "base/memory/scoped_ptr.h" 24 #include "base/memory/scoped_ptr.h"
25 #include "base/message_loop.h" 25 #include "base/message_loop.h"
26 #include "base/process.h" 26 #include "base/process.h"
27 #include "base/time.h" 27 #include "base/time.h"
28 #include "chrome/test/automation/proxy_launcher.h" 28 #include "chrome/test/automation/proxy_launcher.h"
29 #include "googleurl/src/gurl.h" 29 #include "googleurl/src/gurl.h"
30 #include "testing/platform_test.h" 30 #include "testing/platform_test.h"
31 31
32 class AutomationProxy; 32 class AutomationProxy;
33 class BrowserProxy; 33 class BrowserProxy;
34 class DictionaryValue;
35 class FilePath; 34 class FilePath;
36 class GURL; 35 class GURL;
37 class ScopedTempDir; 36 class ScopedTempDir;
38 class TabProxy; 37 class TabProxy;
39 38
39 namespace base {
40 class DictionaryValue;
41 }
42
40 // Base class for UI Tests. This implements the core of the functions. 43 // Base class for UI Tests. This implements the core of the functions.
41 // This base class decouples all automation functionality from testing 44 // This base class decouples all automation functionality from testing
42 // infrastructure, for use without gtest. 45 // infrastructure, for use without gtest.
43 // If using gtest, you probably want to inherit from UITest (declared below) 46 // If using gtest, you probably want to inherit from UITest (declared below)
44 // rather than UITestBase. 47 // rather than UITestBase.
45 class UITestBase { 48 class UITestBase {
46 public: 49 public:
47 // Profile theme type choices. 50 // Profile theme type choices.
48 enum ProfileType { 51 enum ProfileType {
49 DEFAULT_THEME = 0, 52 DEFAULT_THEME = 0,
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 virtual void TearDown(); 372 virtual void TearDown();
370 373
371 virtual ProxyLauncher* CreateProxyLauncher(); 374 virtual ProxyLauncher* CreateProxyLauncher();
372 375
373 // Count the number of active browser processes launched by this test. 376 // Count the number of active browser processes launched by this test.
374 // The count includes browser sub-processes. 377 // The count includes browser sub-processes.
375 bool GetBrowserProcessCount(int* count) WARN_UNUSED_RESULT; 378 bool GetBrowserProcessCount(int* count) WARN_UNUSED_RESULT;
376 379
377 // Returns a copy of local state preferences. The caller is responsible for 380 // Returns a copy of local state preferences. The caller is responsible for
378 // deleting the returned object. Returns NULL if there is an error. 381 // deleting the returned object. Returns NULL if there is an error.
379 DictionaryValue* GetLocalState(); 382 base::DictionaryValue* GetLocalState();
380 383
381 // Returns a copy of the default profile preferences. The caller is 384 // Returns a copy of the default profile preferences. The caller is
382 // responsible for deleting the returned object. Returns NULL if there is an 385 // responsible for deleting the returned object. Returns NULL if there is an
383 // error. 386 // error.
384 DictionaryValue* GetDefaultProfilePreferences(); 387 base::DictionaryValue* GetDefaultProfilePreferences();
385 388
386 // Waits for the test case to finish. 389 // Waits for the test case to finish.
387 // ASSERTS if there are test failures. 390 // ASSERTS if there are test failures.
388 void WaitForFinish(const std::string &name, 391 void WaitForFinish(const std::string &name,
389 const std::string &id, const GURL &url, 392 const std::string &id, const GURL &url,
390 const std::string& test_complete_cookie, 393 const std::string& test_complete_cookie,
391 const std::string& expected_cookie_value, 394 const std::string& expected_cookie_value,
392 const int wait_time); 395 const int wait_time);
393 396
394 // Wrapper around EvictFileFromSystemCache to retry 10 times in case of 397 // Wrapper around EvictFileFromSystemCache to retry 10 times in case of
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 #ifdef UNIT_TEST 484 #ifdef UNIT_TEST
482 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr); 485 std::ostream& operator<<(std::ostream& out, const std::wstring& wstr);
483 486
484 template<typename T> 487 template<typename T>
485 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) { 488 std::ostream& operator<<(std::ostream& out, const ::scoped_ptr<T>& ptr) {
486 return out << ptr.get(); 489 return out << ptr.get();
487 } 490 }
488 #endif // UNIT_TEST 491 #endif // UNIT_TEST
489 492
490 #endif // CHROME_TEST_UI_UI_TEST_H_ 493 #endif // CHROME_TEST_UI_UI_TEST_H_
OLDNEW
« no previous file with comments | « chrome/test/live_sync/live_preferences_sync_test.h ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698