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

Side by Side Diff: chrome/test/media_router/media_router_base_browsertest.h

Issue 2634213002: [Media Router] Add integration browser tests (Closed)
Patch Set: Undo renaming waitUntilDeviceAvailable Created 3 years, 10 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 | « no previous file | chrome/test/media_router/media_router_base_browsertest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_MEDIA_ROUTER_MEDIA_ROUTER_BASE_BROWSERTEST_H_ 5 #ifndef CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_BASE_BROWSERTEST_H_
6 #define CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_BASE_BROWSERTEST_H_ 6 #define CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_BASE_BROWSERTEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 25 matching lines...) Expand all
36 36
37 // InProcessBrowserTest Overrides 37 // InProcessBrowserTest Overrides
38 void SetUp() override; 38 void SetUp() override;
39 void TearDown() override; 39 void TearDown() override;
40 40
41 protected: 41 protected:
42 // InProcessBrowserTest Overrides 42 // InProcessBrowserTest Overrides
43 void SetUpOnMainThread() override; 43 void SetUpOnMainThread() override;
44 void TearDownOnMainThread() override; 44 void TearDownOnMainThread() override;
45 45
46 void InstallAndEnableMRExtension(); 46 virtual void InstallAndEnableMRExtension();
47 void UninstallMRExtension(); 47 virtual void UninstallMRExtension();
48 48
49 virtual void ParseCommandLine(); 49 virtual void ParseCommandLine();
50 50
51 // extensions::ProcessManagerObserver Overrides 51 // extensions::ProcessManagerObserver Overrides
52 void OnBackgroundHostCreated(extensions::ExtensionHost* host) override; 52 void OnBackgroundHostCreated(extensions::ExtensionHost* host) override;
53 53
54 // Wait until get the successful callback or timeout. 54 // Wait until get the successful callback or timeout.
55 // Returns true if the condition is satisfied before the timeout. 55 // Returns true if the condition is satisfied before the timeout.
56 // TODO(leilei): Replace this method with WaitableEvent class. 56 // TODO(leilei): Replace this method with WaitableEvent class.
57 bool ConditionalWait(base::TimeDelta timeout, 57 bool ConditionalWait(base::TimeDelta timeout,
58 base::TimeDelta interval, 58 base::TimeDelta interval,
59 const base::Callback<bool(void)>& callback); 59 const base::Callback<bool(void)>& callback);
60 60
61 // Wait for a specific time. 61 // Wait for a specific time.
62 void Wait(base::TimeDelta timeout); 62 void Wait(base::TimeDelta timeout);
63 63
64 bool is_unpacked() const { return !extension_unpacked_.empty(); }
65
66 bool is_extension_host_created() const { return extension_host_created_; } 64 bool is_extension_host_created() const { return extension_host_created_; }
67 65
68 bool is_incognito() { return profile()->IsOffTheRecord(); } 66 bool is_incognito() { return profile()->IsOffTheRecord(); }
69 67
70 // These values are initialized via flags. 68 // Returns the superclass' browser(). Marked virtual so that it can be
71 base::FilePath extension_crx_; 69 // overridden by MediaRouterIntegrationIncognitoBrowserTest.
70 virtual Browser* browser();
71
72 // |extension_unpacked_| is initialized via a flag.
72 base::FilePath extension_unpacked_; 73 base::FilePath extension_unpacked_;
73 74
74 base::WaitableEvent extension_load_event_; 75 base::WaitableEvent extension_load_event_;
75 std::string extension_id_; 76 std::string extension_id_;
76 bool extension_host_created_; 77 bool extension_host_created_;
77 78
78 private: 79 private:
79 DISALLOW_COPY_AND_ASSIGN(MediaRouterBaseBrowserTest); 80 DISALLOW_COPY_AND_ASSIGN(MediaRouterBaseBrowserTest);
80 }; 81 };
81 82
82 } // namespace media_router 83 } // namespace media_router
83 84
84 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_BASE_BROWSERTEST_H_ 85 #endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_BASE_BROWSERTEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/media_router/media_router_base_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698