OLD | NEW |
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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "chrome/test/base/in_process_browser_test.h" | 12 #include "chrome/test/base/in_process_browser_test.h" |
13 #include "content/public/test/javascript_test_observer.h" | 13 #include "content/public/test/javascript_test_observer.h" |
14 #include "net/test/spawned_test_server/spawned_test_server.h" | 14 #include "net/test/embedded_test_server/embedded_test_server.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class RenderViewHost; | 17 class RenderViewHost; |
18 } | 18 } |
19 | 19 |
20 class PPAPITestMessageHandler : public content::TestMessageHandler { | 20 class PPAPITestMessageHandler : public content::TestMessageHandler { |
21 public: | 21 public: |
22 PPAPITestMessageHandler(); | 22 PPAPITestMessageHandler(); |
23 | 23 |
24 MessageResponse HandleMessage(const std::string& json) override; | 24 MessageResponse HandleMessage(const std::string& json) override; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 PPAPITestBase* test_base_; | 76 PPAPITestBase* test_base_; |
77 bool expecting_infobar_; | 77 bool expecting_infobar_; |
78 bool should_accept_; | 78 bool should_accept_; |
79 }; | 79 }; |
80 | 80 |
81 // Runs the test for a tab given the tab that's already navigated to the | 81 // Runs the test for a tab given the tab that's already navigated to the |
82 // given URL. | 82 // given URL. |
83 void RunTestURL(const GURL& test_url); | 83 void RunTestURL(const GURL& test_url); |
84 // Gets the URL of the the given |test_case| for the given HTTP test server. | 84 // Gets the URL of the the given |test_case| for the given HTTP test server. |
85 // If |extra_params| is non-empty, it will be appended as URL parameters. | 85 // If |extra_params| is non-empty, it will be appended as URL parameters. |
86 GURL GetTestURL(const net::SpawnedTestServer& http_server, | 86 GURL GetTestURL(const net::EmbeddedTestServer& http_server, |
87 const std::string& test_case, | 87 const std::string& test_case, |
88 const std::string& extra_params); | 88 const std::string& extra_params); |
89 }; | 89 }; |
90 | 90 |
91 // In-process plugin test runner. See OutOfProcessPPAPITest below for the | 91 // In-process plugin test runner. See OutOfProcessPPAPITest below for the |
92 // out-of-process version. | 92 // out-of-process version. |
93 class PPAPITest : public PPAPITestBase { | 93 class PPAPITest : public PPAPITestBase { |
94 public: | 94 public: |
95 PPAPITest(); | 95 PPAPITest(); |
96 | 96 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 const std::string& test_case) override; | 196 const std::string& test_case) override; |
197 }; | 197 }; |
198 | 198 |
199 class PPAPIBrokerInfoBarTest : public OutOfProcessPPAPITest { | 199 class PPAPIBrokerInfoBarTest : public OutOfProcessPPAPITest { |
200 public: | 200 public: |
201 // PPAPITestBase override: | 201 // PPAPITestBase override: |
202 void SetUpOnMainThread() override; | 202 void SetUpOnMainThread() override; |
203 }; | 203 }; |
204 | 204 |
205 #endif // CHROME_TEST_PPAPI_PPAPI_TEST_H_ | 205 #endif // CHROME_TEST_PPAPI_PPAPI_TEST_H_ |
OLD | NEW |