Commit 24df4224 authored by tfarina@chromium.org's avatar tfarina@chromium.org

test_runner: Move three Mock* files into content namespace.

BUG=331299
TEST=None, no functional changes. Green trybots to make sure content_shell,
content_unittests, content_browsertests still link.
TBR=jochen@chromium.org

Review URL: https://codereview.chromium.org/251263002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266839 0039d316-1c4b-4281-b951-d872f2087c98
parent 66fd1647
......@@ -7,11 +7,11 @@
#include "content/shell/renderer/test_runner/WebTestDelegate.h"
#include "content/shell/renderer/test_runner/WebTestProxy.h"
using namespace WebTestRunner;
using namespace blink;
using namespace content;
using namespace std;
namespace WebTestRunner {
namespace content {
namespace {
class HostMethodTask : public WebMethodTask<MockColorChooser> {
......@@ -56,4 +56,4 @@ void MockColorChooser::invokeDidEndChooser()
m_client->didEndChooser();
}
}
} // namespace content
......@@ -11,17 +11,17 @@
#include "third_party/WebKit/public/web/WebColorChooser.h"
#include "third_party/WebKit/public/web/WebColorChooserClient.h"
namespace content {
class WebTestProxyBase;
namespace WebTestRunner {
class WebTestDelegate;
}
namespace WebTestRunner {
namespace content {
class WebTestDelegate;
class WebTestProxyBase;
class MockColorChooser : public blink::WebColorChooser {
public:
MockColorChooser(blink::WebColorChooserClient*, WebTestDelegate*, content::WebTestProxyBase*);
MockColorChooser(blink::WebColorChooserClient*, WebTestRunner::WebTestDelegate*, content::WebTestProxyBase*);
virtual ~MockColorChooser();
// blink::WebColorChooser implementation.
......@@ -29,17 +29,17 @@ public:
virtual void endChooser() OVERRIDE;
void invokeDidEndChooser();
WebTaskList* taskList() { return &m_taskList; }
WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
private:
blink::WebColorChooserClient* m_client;
WebTestDelegate* m_delegate;
WebTestRunner::WebTestDelegate* m_delegate;
content::WebTestProxyBase* m_proxy;
WebTaskList m_taskList;
WebTestRunner::WebTaskList m_taskList;
DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
};
}
} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCOLORCHOOSER_H_
......@@ -9,7 +9,7 @@
using namespace blink;
namespace WebTestRunner {
namespace content {
namespace {
......@@ -56,4 +56,4 @@ bool MockConstraints::verifyConstraints(const WebMediaConstraints& constraints,
return true;
}
}
} // namespace content
......@@ -10,13 +10,13 @@ class WebMediaConstraints;
class WebString;
}
namespace WebTestRunner {
namespace content {
class MockConstraints {
public:
static bool verifyConstraints(const blink::WebMediaConstraints&, blink::WebString* failedConstraint = 0);
};
}
} // content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKCONSTRAINTS_H_
......@@ -15,13 +15,13 @@
using namespace blink;
using namespace std;
namespace WebTestRunner {
namespace content {
bool MockGrammarCheck::checkGrammarOfString(const WebString& text, vector<WebTextCheckingResult>* results)
{
DCHECK(results);
base::string16 stringText = text;
if (find_if(stringText.begin(), stringText.end(), isASCIIAlpha) == stringText.end())
if (find_if(stringText.begin(), stringText.end(), WebTestRunner::isASCIIAlpha) == stringText.end())
return true;
// Find matching grammatical errors from known ones. This function has to
......@@ -56,4 +56,4 @@ bool MockGrammarCheck::checkGrammarOfString(const WebString& text, vector<WebTex
return false;
}
}
} // namespace content
......@@ -8,13 +8,11 @@
#include <vector>
namespace blink {
class WebString;
struct WebTextCheckingResult;
}
namespace WebTestRunner {
namespace content {
// A mock implementation of a grammar-checker used for WebKit tests. This class
// only implements the minimal functionarities required by WebKit tests, i.e.
......@@ -26,6 +24,6 @@ public:
static bool checkGrammarOfString(const blink::WebString&, std::vector<blink::WebTextCheckingResult>*);
};
}
} // namespace content
#endif // MockSpellCheck_h
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKGRAMMARCHECK_H_
......@@ -20,6 +20,7 @@
#include "third_party/WebKit/public/platform/WebVector.h"
using namespace blink;
using namespace content;
namespace WebTestRunner {
......
......@@ -20,6 +20,8 @@
using namespace blink;
using content::MockConstraints;
namespace WebTestRunner {
class UserMediaRequestTask : public WebMethodTask<WebUserMediaClientMock> {
......
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