summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-29 11:07:23 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-29 11:07:23 +0000
commit24df4224ed1493459f24756a2e95e05ea117bc6f (patch)
tree993e0ac40779733410fcc6883be82e5a8d7b9c57 /content/shell
parent66fd1647148391436d04b9a1e98c640a22cda703 (diff)
downloadchromium_src-24df4224ed1493459f24756a2e95e05ea117bc6f.zip
chromium_src-24df4224ed1493459f24756a2e95e05ea117bc6f.tar.gz
chromium_src-24df4224ed1493459f24756a2e95e05ea117bc6f.tar.bz2
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
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/renderer/test_runner/MockColorChooser.cpp6
-rw-r--r--content/shell/renderer/test_runner/MockColorChooser.h18
-rw-r--r--content/shell/renderer/test_runner/MockConstraints.cpp4
-rw-r--r--content/shell/renderer/test_runner/MockConstraints.h4
-rw-r--r--content/shell/renderer/test_runner/MockGrammarCheck.cpp6
-rw-r--r--content/shell/renderer/test_runner/MockGrammarCheck.h8
-rw-r--r--content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp1
-rw-r--r--content/shell/renderer/test_runner/WebUserMediaClientMock.cpp2
8 files changed, 25 insertions, 24 deletions
diff --git a/content/shell/renderer/test_runner/MockColorChooser.cpp b/content/shell/renderer/test_runner/MockColorChooser.cpp
index fbd6faa..c9321fc 100644
--- a/content/shell/renderer/test_runner/MockColorChooser.cpp
+++ b/content/shell/renderer/test_runner/MockColorChooser.cpp
@@ -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
diff --git a/content/shell/renderer/test_runner/MockColorChooser.h b/content/shell/renderer/test_runner/MockColorChooser.h
index db6a7b1..5a71f92 100644
--- a/content/shell/renderer/test_runner/MockColorChooser.h
+++ b/content/shell/renderer/test_runner/MockColorChooser.h
@@ -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_
diff --git a/content/shell/renderer/test_runner/MockConstraints.cpp b/content/shell/renderer/test_runner/MockConstraints.cpp
index 2fdb9fe..7e01872 100644
--- a/content/shell/renderer/test_runner/MockConstraints.cpp
+++ b/content/shell/renderer/test_runner/MockConstraints.cpp
@@ -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
diff --git a/content/shell/renderer/test_runner/MockConstraints.h b/content/shell/renderer/test_runner/MockConstraints.h
index 118cda0..6bcedad 100644
--- a/content/shell/renderer/test_runner/MockConstraints.h
+++ b/content/shell/renderer/test_runner/MockConstraints.h
@@ -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_
diff --git a/content/shell/renderer/test_runner/MockGrammarCheck.cpp b/content/shell/renderer/test_runner/MockGrammarCheck.cpp
index 0744af7..960129a 100644
--- a/content/shell/renderer/test_runner/MockGrammarCheck.cpp
+++ b/content/shell/renderer/test_runner/MockGrammarCheck.cpp
@@ -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
diff --git a/content/shell/renderer/test_runner/MockGrammarCheck.h b/content/shell/renderer/test_runner/MockGrammarCheck.h
index 451493c..9b0d4af 100644
--- a/content/shell/renderer/test_runner/MockGrammarCheck.h
+++ b/content/shell/renderer/test_runner/MockGrammarCheck.h
@@ -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_
diff --git a/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp b/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp
index 8cb0865d..cfdbe54 100644
--- a/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp
+++ b/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp
@@ -20,6 +20,7 @@
#include "third_party/WebKit/public/platform/WebVector.h"
using namespace blink;
+using namespace content;
namespace WebTestRunner {
diff --git a/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp b/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp
index f384d3e..fe1701d 100644
--- a/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp
+++ b/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp
@@ -20,6 +20,8 @@
using namespace blink;
+using content::MockConstraints;
+
namespace WebTestRunner {
class UserMediaRequestTask : public WebMethodTask<WebUserMediaClientMock> {