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

Side by Side Diff: chrome/test/ppapi/ppapi_test.h

Issue 12033057: Make PPAPI test servers start in parallel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comments per review request Created 7 years, 11 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 | chrome/test/ppapi/ppapi_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) 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 #ifndef CHROME_TEST_PPAPI_PPAPI_TEST_H_ 5 #ifndef CHROME_TEST_PPAPI_PPAPI_TEST_H_
6 #define CHROME_TEST_PPAPI_PPAPI_TEST_H_ 6 #define CHROME_TEST_PPAPI_PPAPI_TEST_H_
7 7
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "chrome/test/base/javascript_test_observer.h" 14 #include "chrome/test/base/javascript_test_observer.h"
15 #include "net/test/test_server.h"
15 16
16 namespace content { 17 namespace content {
17 class RenderViewHost; 18 class RenderViewHost;
18 } 19 }
19 20
20 class PPAPITestMessageHandler : public TestMessageHandler { 21 class PPAPITestMessageHandler : public TestMessageHandler {
21 public: 22 public:
22 PPAPITestMessageHandler(); 23 PPAPITestMessageHandler();
23 24
24 MessageResponse HandleMessage(const std::string& json); 25 MessageResponse HandleMessage(const std::string& json);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 private: 75 private:
75 content::NotificationRegistrar registrar_; 76 content::NotificationRegistrar registrar_;
76 std::list<bool> expected_infobars_; 77 std::list<bool> expected_infobars_;
77 }; 78 };
78 79
79 // Runs the test for a tab given the tab that's already navigated to the 80 // Runs the test for a tab given the tab that's already navigated to the
80 // given URL. 81 // given URL.
81 void RunTestURL(const GURL& test_url); 82 void RunTestURL(const GURL& test_url);
82 // Run the given |test_case| on a HTTP test server whose document root is 83 // Run the given |test_case| on a HTTP test server whose document root is
83 // specified by |document_root|. |extra_params| will be passed as URL 84 // specified by |document_root|. |extra_params| will be passed as URL
84 // parameters to the test. 85 // parameters to the test. If |extra_server| is valid, we will wait on it to
86 // start before runnint the test. This is for cases where we need an
yzshen1 2013/01/24 17:42:02 runnint -> running
87 // additional server, such as a WebSockets server, so that we can start the
88 // two servers up in parallel.
85 void RunHTTPTestServer(const FilePath& document_root, 89 void RunHTTPTestServer(const FilePath& document_root,
86 const std::string& test_case, 90 const std::string& test_case,
87 const std::string& extra_params); 91 const std::string& extra_params,
92 net::TestServer* extra_server);
88 // Return the document root for the HTTP server on which tests will be run. 93 // Return the document root for the HTTP server on which tests will be run.
89 // The result is placed in |document_root|. False is returned upon failure. 94 // The result is placed in |document_root|. False is returned upon failure.
90 bool GetHTTPDocumentRoot(FilePath* document_root); 95 bool GetHTTPDocumentRoot(FilePath* document_root);
91 }; 96 };
92 97
93 // In-process plugin test runner. See OutOfProcessPPAPITest below for the 98 // In-process plugin test runner. See OutOfProcessPPAPITest below for the
94 // out-of-process version. 99 // out-of-process version.
95 class PPAPITest : public PPAPITestBase { 100 class PPAPITest : public PPAPITestBase {
96 public: 101 public:
97 PPAPITest(); 102 PPAPITest();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 const std::string& test_case) OVERRIDE; 144 const std::string& test_case) OVERRIDE;
140 }; 145 };
141 146
142 class PPAPIBrokerInfoBarTest : public OutOfProcessPPAPITest { 147 class PPAPIBrokerInfoBarTest : public OutOfProcessPPAPITest {
143 public: 148 public:
144 // PPAPITestBase override: 149 // PPAPITestBase override:
145 virtual void SetUpOnMainThread() OVERRIDE; 150 virtual void SetUpOnMainThread() OVERRIDE;
146 }; 151 };
147 152
148 #endif // CHROME_TEST_PPAPI_PPAPI_TEST_H_ 153 #endif // CHROME_TEST_PPAPI_PPAPI_TEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/test/ppapi/ppapi_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698