Commit efc3a40e authored by toyoshim@chromium.org's avatar toyoshim@chromium.org

Add RunTestWithWebSocketServer for subsequent Pepper WebSocket API tests.

BUG=87310
TEST=n/a


Review URL: http://codereview.chromium.org/8642001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111293 0039d316-1c4b-4281-b951-d872f2087c98
parent 5066ed5f
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/test/automation/tab_proxy.h" #include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chrome/test/ui/ui_test.h" #include "chrome/test/ui/ui_test.h"
#include "net/base/net_util.h" #include "net/base/net_util.h"
#include "net/test/test_server.h" #include "net/test/test_server.h"
...@@ -106,6 +107,16 @@ class PPAPITestBase : public UITest { ...@@ -106,6 +107,16 @@ class PPAPITestBase : public UITest {
RunTestURL(test_server.GetURL(query)); RunTestURL(test_server.GetURL(query));
} }
void RunTestWithWebSocketServer(const std::string& test_case) {
FilePath websocket_root_dir;
ASSERT_TRUE(
PathService::Get(chrome::DIR_LAYOUT_TESTS, &websocket_root_dir));
ui_test_utils::TestWebSocketServer server;
ASSERT_TRUE(server.Start(websocket_root_dir));
RunTest(test_case);
}
private: private:
void RunTestURL(const GURL& test_url) { void RunTestURL(const GURL& test_url) {
scoped_refptr<TabProxy> tab(GetActiveTab()); scoped_refptr<TabProxy> tab(GetActiveTab());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment