summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-04 05:16:16 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-04 05:16:16 +0000
commit79ecada319a1c20f49a97668b083ecae7555ff07 (patch)
tree9484426b6db4aed32b906f8773030864b933b7d1
parenteb4f7a3bb7290b74933563871be585c0dcd1d5af (diff)
downloadchromium_src-79ecada319a1c20f49a97668b083ecae7555ff07.zip
chromium_src-79ecada319a1c20f49a97668b083ecae7555ff07.tar.gz
chromium_src-79ecada319a1c20f49a97668b083ecae7555ff07.tar.bz2
test_runner: Move everything else into content namespace.
BUG=331299 TEST=None, no functional changes. Green trybots. TBR=jochen@chromium.org Review URL: https://codereview.chromium.org/264003003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268097 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/shell/common/webkit_test_helpers.h11
-rw-r--r--content/shell/renderer/shell_content_renderer_client.cc2
-rw-r--r--content/shell/renderer/shell_render_process_observer.cc2
-rw-r--r--content/shell/renderer/shell_render_process_observer.h17
-rw-r--r--content/shell/renderer/test_runner/MockColorChooser.cpp1
-rw-r--r--content/shell/renderer/test_runner/MockColorChooser.h15
-rw-r--r--content/shell/renderer/test_runner/MockGrammarCheck.cpp2
-rw-r--r--content/shell/renderer/test_runner/MockSpellCheck.cpp1
-rw-r--r--content/shell/renderer/test_runner/MockWebMIDIAccessor.cpp3
-rw-r--r--content/shell/renderer/test_runner/MockWebMIDIAccessor.h14
-rw-r--r--content/shell/renderer/test_runner/MockWebMediaStreamCenter.cpp4
-rw-r--r--content/shell/renderer/test_runner/MockWebMediaStreamCenter.h4
-rw-r--r--content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.cpp4
-rw-r--r--content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h4
-rw-r--r--content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.cpp4
-rw-r--r--content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h4
-rw-r--r--content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp5
-rw-r--r--content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h4
-rw-r--r--content/shell/renderer/test_runner/MockWebSpeechRecognizer.cpp4
-rw-r--r--content/shell/renderer/test_runner/MockWebSpeechRecognizer.h4
-rw-r--r--content/shell/renderer/test_runner/SpellCheckClient.cpp3
-rw-r--r--content/shell/renderer/test_runner/SpellCheckClient.h19
-rw-r--r--content/shell/renderer/test_runner/TestCommon.cpp6
-rw-r--r--content/shell/renderer/test_runner/TestCommon.h4
-rw-r--r--content/shell/renderer/test_runner/TestInterfaces.cpp21
-rw-r--r--content/shell/renderer/test_runner/TestInterfaces.h39
-rw-r--r--content/shell/renderer/test_runner/TestPlugin.cpp6
-rw-r--r--content/shell/renderer/test_runner/TestPlugin.h6
-rw-r--r--content/shell/renderer/test_runner/WebPermissions.cpp1
-rw-r--r--content/shell/renderer/test_runner/WebPermissions.h10
-rw-r--r--content/shell/renderer/test_runner/WebTask.cpp4
-rw-r--r--content/shell/renderer/test_runner/WebTask.h4
-rw-r--r--content/shell/renderer/test_runner/WebTestDelegate.h15
-rw-r--r--content/shell/renderer/test_runner/WebTestInterfaces.cpp5
-rw-r--r--content/shell/renderer/test_runner/WebTestInterfaces.h9
-rw-r--r--content/shell/renderer/test_runner/WebTestProxy.cpp1
-rw-r--r--content/shell/renderer/test_runner/WebTestProxy.h29
-rw-r--r--content/shell/renderer/test_runner/WebTestRunner.h4
-rw-r--r--content/shell/renderer/test_runner/WebTestThemeEngineMac.h4
-rw-r--r--content/shell/renderer/test_runner/WebTestThemeEngineMac.mm6
-rw-r--r--content/shell/renderer/test_runner/WebTestThemeEngineMock.cpp4
-rw-r--r--content/shell/renderer/test_runner/WebTestThemeEngineMock.h15
-rw-r--r--content/shell/renderer/test_runner/WebUserMediaClientMock.cpp6
-rw-r--r--content/shell/renderer/test_runner/WebUserMediaClientMock.h4
-rw-r--r--content/shell/renderer/test_runner/accessibility_controller.cc3
-rw-r--r--content/shell/renderer/test_runner/accessibility_controller.h10
-rw-r--r--content/shell/renderer/test_runner/event_sender.cc14
-rw-r--r--content/shell/renderer/test_runner/event_sender.h18
-rw-r--r--content/shell/renderer/test_runner/gamepad_controller.cc2
-rw-r--r--content/shell/renderer/test_runner/gamepad_controller.h10
-rw-r--r--content/shell/renderer/test_runner/notification_presenter.h12
-rw-r--r--content/shell/renderer/test_runner/test_runner.cc23
-rw-r--r--content/shell/renderer/test_runner/test_runner.h32
-rw-r--r--content/shell/renderer/webkit_test_runner.cc2
-rw-r--r--content/shell/renderer/webkit_test_runner.h7
-rw-r--r--content/test/layouttest_support.cc3
56 files changed, 201 insertions, 269 deletions
diff --git a/content/shell/common/webkit_test_helpers.h b/content/shell/common/webkit_test_helpers.h
index ffdbb2d..08f3e69 100644
--- a/content/shell/common/webkit_test_helpers.h
+++ b/content/shell/common/webkit_test_helpers.h
@@ -20,12 +20,11 @@ namespace content {
struct TestPreferences;
-// The TestRunner library keeps its settings in a WebTestRunner::WebPreferenes
-// object. The content_shell, however, uses WebPreferences. This
-// method exports the settings from the WebTestRunner library which are relevant
-// for layout tests.
-void ExportLayoutTestSpecificPreferences(
- const TestPreferences& from, WebPreferences* to);
+// The TestRunner library keeps its settings in a WebPreferenes object.
+// The content_shell, however, uses WebPreferences. This method exports the
+// settings from the WebTestRunner library which are relevant for layout tests.
+void ExportLayoutTestSpecificPreferences(const TestPreferences& from,
+ WebPreferences* to);
// Applies settings that differ between layout tests and regular mode.
void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs);
diff --git a/content/shell/renderer/shell_content_renderer_client.cc b/content/shell/renderer/shell_content_renderer_client.cc
index e0585cc..fdb0bc2 100644
--- a/content/shell/renderer/shell_content_renderer_client.cc
+++ b/content/shell/renderer/shell_content_renderer_client.cc
@@ -45,8 +45,6 @@ using blink::WebPluginParams;
using blink::WebRTCPeerConnectionHandler;
using blink::WebRTCPeerConnectionHandlerClient;
using blink::WebThemeEngine;
-using WebTestRunner::WebTestDelegate;
-using WebTestRunner::WebTestInterfaces;
namespace content {
diff --git a/content/shell/renderer/shell_render_process_observer.cc b/content/shell/renderer/shell_render_process_observer.cc
index 9760c64..6b32d7a 100644
--- a/content/shell/renderer/shell_render_process_observer.cc
+++ b/content/shell/renderer/shell_render_process_observer.cc
@@ -20,8 +20,6 @@
using blink::WebFrame;
using blink::WebRuntimeFeatures;
-using WebTestRunner::WebTestDelegate;
-using WebTestRunner::WebTestInterfaces;
namespace content {
diff --git a/content/shell/renderer/shell_render_process_observer.h b/content/shell/renderer/shell_render_process_observer.h
index ffe59e2..1a42e8a 100644
--- a/content/shell/renderer/shell_render_process_observer.h
+++ b/content/shell/renderer/shell_render_process_observer.h
@@ -16,15 +16,12 @@ namespace blink {
class WebFrame;
}
-namespace WebTestRunner {
-class WebTestDelegate;
-class WebTestInterfaces;
-}
-
namespace content {
class RenderView;
class WebKitTestRunner;
+class WebTestDelegate;
+class WebTestInterfaces;
class ShellRenderProcessObserver : public RenderProcessObserver {
public:
@@ -33,7 +30,7 @@ class ShellRenderProcessObserver : public RenderProcessObserver {
ShellRenderProcessObserver();
virtual ~ShellRenderProcessObserver();
- void SetTestDelegate(WebTestRunner::WebTestDelegate* delegate);
+ void SetTestDelegate(WebTestDelegate* delegate);
void SetMainWindow(RenderView* view);
// RenderProcessObserver implementation.
@@ -41,10 +38,10 @@ class ShellRenderProcessObserver : public RenderProcessObserver {
virtual void OnRenderProcessShutdown() OVERRIDE;
virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
- WebTestRunner::WebTestDelegate* test_delegate() const {
+ WebTestDelegate* test_delegate() const {
return test_delegate_;
}
- WebTestRunner::WebTestInterfaces* test_interfaces() const {
+ WebTestInterfaces* test_interfaces() const {
return test_interfaces_.get();
}
WebKitTestRunner* main_test_runner() const { return main_test_runner_; }
@@ -56,8 +53,8 @@ class ShellRenderProcessObserver : public RenderProcessObserver {
void OnSetWebKitSourceDir(const base::FilePath& webkit_source_dir);
WebKitTestRunner* main_test_runner_;
- WebTestRunner::WebTestDelegate* test_delegate_;
- scoped_ptr<WebTestRunner::WebTestInterfaces> test_interfaces_;
+ WebTestDelegate* test_delegate_;
+ scoped_ptr<WebTestInterfaces> test_interfaces_;
base::FilePath webkit_source_dir_;
diff --git a/content/shell/renderer/test_runner/MockColorChooser.cpp b/content/shell/renderer/test_runner/MockColorChooser.cpp
index c9321fc..cd7609b 100644
--- a/content/shell/renderer/test_runner/MockColorChooser.cpp
+++ b/content/shell/renderer/test_runner/MockColorChooser.cpp
@@ -7,7 +7,6 @@
#include "content/shell/renderer/test_runner/WebTestDelegate.h"
#include "content/shell/renderer/test_runner/WebTestProxy.h"
-using namespace WebTestRunner;
using namespace blink;
using namespace std;
diff --git a/content/shell/renderer/test_runner/MockColorChooser.h b/content/shell/renderer/test_runner/MockColorChooser.h
index 5a71f92..a4a269a 100644
--- a/content/shell/renderer/test_runner/MockColorChooser.h
+++ b/content/shell/renderer/test_runner/MockColorChooser.h
@@ -11,17 +11,14 @@
#include "third_party/WebKit/public/web/WebColorChooser.h"
#include "third_party/WebKit/public/web/WebColorChooserClient.h"
-namespace WebTestRunner {
-class WebTestDelegate;
-}
-
namespace content {
+class WebTestDelegate;
class WebTestProxyBase;
class MockColorChooser : public blink::WebColorChooser {
public:
- MockColorChooser(blink::WebColorChooserClient*, WebTestRunner::WebTestDelegate*, content::WebTestProxyBase*);
+ MockColorChooser(blink::WebColorChooserClient*, WebTestDelegate*, WebTestProxyBase*);
virtual ~MockColorChooser();
// blink::WebColorChooser implementation.
@@ -29,13 +26,13 @@ public:
virtual void endChooser() OVERRIDE;
void invokeDidEndChooser();
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
+ WebTaskList* taskList() { return &m_taskList; }
private:
blink::WebColorChooserClient* m_client;
- WebTestRunner::WebTestDelegate* m_delegate;
- content::WebTestProxyBase* m_proxy;
- WebTestRunner::WebTaskList m_taskList;
+ WebTestDelegate* m_delegate;
+ WebTestProxyBase* m_proxy;
+ WebTaskList m_taskList;
DISALLOW_COPY_AND_ASSIGN(MockColorChooser);
};
diff --git a/content/shell/renderer/test_runner/MockGrammarCheck.cpp b/content/shell/renderer/test_runner/MockGrammarCheck.cpp
index 960129a..9bf1e32 100644
--- a/content/shell/renderer/test_runner/MockGrammarCheck.cpp
+++ b/content/shell/renderer/test_runner/MockGrammarCheck.cpp
@@ -21,7 +21,7 @@ bool MockGrammarCheck::checkGrammarOfString(const WebString& text, vector<WebTex
{
DCHECK(results);
base::string16 stringText = text;
- if (find_if(stringText.begin(), stringText.end(), WebTestRunner::isASCIIAlpha) == stringText.end())
+ if (find_if(stringText.begin(), stringText.end(), isASCIIAlpha) == stringText.end())
return true;
// Find matching grammatical errors from known ones. This function has to
diff --git a/content/shell/renderer/test_runner/MockSpellCheck.cpp b/content/shell/renderer/test_runner/MockSpellCheck.cpp
index c0bd70c..6342c6c 100644
--- a/content/shell/renderer/test_runner/MockSpellCheck.cpp
+++ b/content/shell/renderer/test_runner/MockSpellCheck.cpp
@@ -8,7 +8,6 @@
#include "content/shell/renderer/test_runner/TestCommon.h"
#include "third_party/WebKit/public/platform/WebCString.h"
-using namespace WebTestRunner;
using namespace blink;
using namespace std;
diff --git a/content/shell/renderer/test_runner/MockWebMIDIAccessor.cpp b/content/shell/renderer/test_runner/MockWebMIDIAccessor.cpp
index 0256283c..b7841ab 100644
--- a/content/shell/renderer/test_runner/MockWebMIDIAccessor.cpp
+++ b/content/shell/renderer/test_runner/MockWebMIDIAccessor.cpp
@@ -11,13 +11,12 @@
#include "third_party/WebKit/public/platform/WebMIDIAccessorClient.h"
using namespace blink;
-using WebTestRunner::TestInterfaces;
namespace content {
namespace {
-class DidStartSessionTask : public WebTestRunner::WebMethodTask<MockWebMIDIAccessor> {
+class DidStartSessionTask : public WebMethodTask<MockWebMIDIAccessor> {
public:
DidStartSessionTask(MockWebMIDIAccessor* object, blink::WebMIDIAccessorClient* client, bool result)
: WebMethodTask<MockWebMIDIAccessor>(object)
diff --git a/content/shell/renderer/test_runner/MockWebMIDIAccessor.h b/content/shell/renderer/test_runner/MockWebMIDIAccessor.h
index 06fb206..302c5bf 100644
--- a/content/shell/renderer/test_runner/MockWebMIDIAccessor.h
+++ b/content/shell/renderer/test_runner/MockWebMIDIAccessor.h
@@ -14,15 +14,13 @@ namespace blink {
class WebMIDIAccessorClient;
}
-namespace WebTestRunner {
-class TestInterfaces;
-}
-
namespace content {
+class TestInterfaces;
+
class MockWebMIDIAccessor : public blink::WebMIDIAccessor {
public:
- explicit MockWebMIDIAccessor(blink::WebMIDIAccessorClient*, WebTestRunner::TestInterfaces*);
+ explicit MockWebMIDIAccessor(blink::WebMIDIAccessorClient*, TestInterfaces*);
virtual ~MockWebMIDIAccessor();
// blink::WebMIDIAccessor implementation.
@@ -33,12 +31,12 @@ public:
double timestamp) OVERRIDE {}
// WebTask related methods
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
+ WebTaskList* taskList() { return &m_taskList; }
private:
blink::WebMIDIAccessorClient* m_client;
- WebTestRunner::WebTaskList m_taskList;
- WebTestRunner::TestInterfaces* m_interfaces;
+ WebTaskList m_taskList;
+ TestInterfaces* m_interfaces;
DISALLOW_COPY_AND_ASSIGN(MockWebMIDIAccessor);
};
diff --git a/content/shell/renderer/test_runner/MockWebMediaStreamCenter.cpp b/content/shell/renderer/test_runner/MockWebMediaStreamCenter.cpp
index a937b1a..e5d0d39 100644
--- a/content/shell/renderer/test_runner/MockWebMediaStreamCenter.cpp
+++ b/content/shell/renderer/test_runner/MockWebMediaStreamCenter.cpp
@@ -19,7 +19,7 @@
using namespace blink;
-namespace WebTestRunner {
+namespace content {
class NewTrackTask : public WebMethodTask<MockWebMediaStreamCenter> {
public:
@@ -123,4 +123,4 @@ blink::WebAudioSourceProvider* MockWebMediaStreamCenter::createWebAudioSourceFro
return NULL;
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/MockWebMediaStreamCenter.h b/content/shell/renderer/test_runner/MockWebMediaStreamCenter.h
index fbc67a7..2aee2b8 100644
--- a/content/shell/renderer/test_runner/MockWebMediaStreamCenter.h
+++ b/content/shell/renderer/test_runner/MockWebMediaStreamCenter.h
@@ -16,7 +16,7 @@ class WebAudioSourceProvider;
class WebMediaStreamCenterClient;
};
-namespace WebTestRunner {
+namespace content {
class TestInterfaces;
@@ -45,6 +45,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(MockWebMediaStreamCenter);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBMEDIASTREAMCENTER_H_
diff --git a/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.cpp b/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.cpp
index 223c16d..4ab7159 100644
--- a/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.cpp
+++ b/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.cpp
@@ -12,7 +12,7 @@
using namespace blink;
-namespace WebTestRunner {
+namespace content {
class DTMFSenderToneTask : public WebMethodTask<MockWebRTCDTMFSenderHandler> {
public:
@@ -70,4 +70,4 @@ bool MockWebRTCDTMFSenderHandler::insertDTMF(const WebString& tones, long durati
return true;
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h b/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h
index 7062f57..82425ff 100644
--- a/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h
+++ b/content/shell/renderer/test_runner/MockWebRTCDTMFSenderHandler.h
@@ -12,7 +12,7 @@
#include "third_party/WebKit/public/platform/WebRTCDTMFSenderHandler.h"
#include "third_party/WebKit/public/platform/WebString.h"
-namespace WebTestRunner {
+namespace content {
class WebTestDelegate;
@@ -43,6 +43,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(MockWebRTCDTMFSenderHandler);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCDTMFSENDERHANDLER_H_
diff --git a/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.cpp b/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.cpp
index f70fa00..9308557 100644
--- a/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.cpp
+++ b/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.cpp
@@ -11,7 +11,7 @@
using namespace blink;
-namespace WebTestRunner {
+namespace content {
class DataChannelReadyStateTask : public WebMethodTask<MockWebRTCDataChannelHandler> {
public:
@@ -115,4 +115,4 @@ void MockWebRTCDataChannelHandler::close()
m_delegate->postTask(new DataChannelReadyStateTask(this, m_client, WebRTCDataChannelHandlerClient::ReadyStateClosed));
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h b/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h
index db1e6c4..6d2d604 100644
--- a/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h
+++ b/content/shell/renderer/test_runner/MockWebRTCDataChannelHandler.h
@@ -12,7 +12,7 @@
#include "third_party/WebKit/public/platform/WebRTCDataChannelInit.h"
#include "third_party/WebKit/public/platform/WebString.h"
-namespace WebTestRunner {
+namespace content {
class WebTestDelegate;
@@ -50,6 +50,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(MockWebRTCDataChannelHandler);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCDATACHANNELHANDLER_H_
diff --git a/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp b/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp
index cfdbe54..831d2fb 100644
--- a/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp
+++ b/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.cpp
@@ -20,9 +20,8 @@
#include "third_party/WebKit/public/platform/WebVector.h"
using namespace blink;
-using namespace content;
-namespace WebTestRunner {
+namespace content {
class RTCSessionDescriptionRequestSuccededTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
public:
@@ -283,4 +282,4 @@ void MockWebRTCPeerConnectionHandler::stop()
m_stopped = true;
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h b/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h
index cff8864..18ccf87 100644
--- a/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h
+++ b/content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h
@@ -17,7 +17,7 @@ namespace blink {
class WebRTCPeerConnectionHandlerClient;
};
-namespace WebTestRunner {
+namespace content {
class TestInterfaces;
@@ -60,6 +60,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(MockWebRTCPeerConnectionHandler);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBRTCPEERCONNECTIONHANDLER_H_
diff --git a/content/shell/renderer/test_runner/MockWebSpeechRecognizer.cpp b/content/shell/renderer/test_runner/MockWebSpeechRecognizer.cpp
index 8aa232d..1d44c9d 100644
--- a/content/shell/renderer/test_runner/MockWebSpeechRecognizer.cpp
+++ b/content/shell/renderer/test_runner/MockWebSpeechRecognizer.cpp
@@ -12,7 +12,7 @@
using namespace blink;
using namespace std;
-namespace WebTestRunner {
+namespace content {
namespace {
@@ -224,4 +224,4 @@ void MockWebSpeechRecognizer::StepTask::runIfValid()
m_object->m_delegate->postTask(new StepTask(m_object));
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/MockWebSpeechRecognizer.h b/content/shell/renderer/test_runner/MockWebSpeechRecognizer.h
index fd6e138..fa1a606 100644
--- a/content/shell/renderer/test_runner/MockWebSpeechRecognizer.h
+++ b/content/shell/renderer/test_runner/MockWebSpeechRecognizer.h
@@ -19,7 +19,7 @@ class WebSpeechRecognitionParams;
class WebSpeechRecognizerClient;
}
-namespace WebTestRunner {
+namespace content {
class WebTestDelegate;
@@ -81,6 +81,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(MockWebSpeechRecognizer);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBSPEECHRECOGNIZER_H_
diff --git a/content/shell/renderer/test_runner/SpellCheckClient.cpp b/content/shell/renderer/test_runner/SpellCheckClient.cpp
index 18caa4d..3e8d47d 100644
--- a/content/shell/renderer/test_runner/SpellCheckClient.cpp
+++ b/content/shell/renderer/test_runner/SpellCheckClient.cpp
@@ -10,7 +10,6 @@
#include "third_party/WebKit/public/web/WebTextCheckingCompletion.h"
#include "third_party/WebKit/public/web/WebTextCheckingResult.h"
-using namespace WebTestRunner;
using namespace blink;
using namespace std;
@@ -32,7 +31,7 @@ private:
CallbackMethodType m_callback;
};
-}
+} // namespace
SpellCheckClient::SpellCheckClient(WebTestProxyBase* webTestProxy)
: m_lastRequestedTextCheckingCompletion(0)
diff --git a/content/shell/renderer/test_runner/SpellCheckClient.h b/content/shell/renderer/test_runner/SpellCheckClient.h
index d4503e4..d7efa92 100644
--- a/content/shell/renderer/test_runner/SpellCheckClient.h
+++ b/content/shell/renderer/test_runner/SpellCheckClient.h
@@ -11,23 +11,18 @@
#include "third_party/WebKit/public/web/WebSpellCheckClient.h"
namespace content {
-class WebTestProxyBase;
-}
-namespace WebTestRunner {
class WebTestDelegate;
-}
-
-namespace content {
+class WebTestProxyBase;
class SpellCheckClient : public blink::WebSpellCheckClient {
public:
- explicit SpellCheckClient(content::WebTestProxyBase*);
+ explicit SpellCheckClient(WebTestProxyBase*);
virtual ~SpellCheckClient();
- void setDelegate(WebTestRunner::WebTestDelegate*);
+ void setDelegate(WebTestDelegate*);
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
+ WebTaskList* taskList() { return &m_taskList; }
MockSpellCheck* mockSpellCheck() { return &m_spellcheck; }
// blink::WebSpellCheckClient implementation.
@@ -48,11 +43,11 @@ private:
blink::WebString m_lastRequestedTextCheckString;
blink::WebTextCheckingCompletion* m_lastRequestedTextCheckingCompletion;
- WebTestRunner::WebTaskList m_taskList;
+ WebTaskList m_taskList;
- WebTestRunner::WebTestDelegate* m_delegate;
+ WebTestDelegate* m_delegate;
- content::WebTestProxyBase* m_webTestProxy;
+ WebTestProxyBase* m_webTestProxy;
DISALLOW_COPY_AND_ASSIGN(SpellCheckClient);
};
diff --git a/content/shell/renderer/test_runner/TestCommon.cpp b/content/shell/renderer/test_runner/TestCommon.cpp
index 691ecdd..24e642d 100644
--- a/content/shell/renderer/test_runner/TestCommon.cpp
+++ b/content/shell/renderer/test_runner/TestCommon.cpp
@@ -6,7 +6,7 @@
using namespace std;
-namespace WebTestRunner {
+namespace content {
namespace {
@@ -17,7 +17,7 @@ const char fileTestPrefix[] = "(file test):";
const char dataUrlPattern[] = "data:";
const string::size_type dataUrlPatternSize = sizeof(dataUrlPattern) - 1;
-}
+} // namespace
string normalizeLayoutTestURL(const string& url)
{
@@ -34,4 +34,4 @@ string normalizeLayoutTestURL(const string& url)
return result;
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/TestCommon.h b/content/shell/renderer/test_runner/TestCommon.h
index bdf3ea7..7144158 100644
--- a/content/shell/renderer/test_runner/TestCommon.h
+++ b/content/shell/renderer/test_runner/TestCommon.h
@@ -14,7 +14,7 @@
#define snprintf(str, size, ...) _snprintf_s(str, size, size, __VA_ARGS__)
#endif
-namespace WebTestRunner {
+namespace content {
inline bool isASCIIAlpha(char ch) { return (ch | 0x20) >= 'a' && (ch | 0x20) <= 'z'; }
@@ -22,6 +22,6 @@ inline bool isNotASCIIAlpha(char ch) { return !isASCIIAlpha(ch); }
std::string normalizeLayoutTestURL(const std::string& url);
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTCOMMON_H_
diff --git a/content/shell/renderer/test_runner/TestInterfaces.cpp b/content/shell/renderer/test_runner/TestInterfaces.cpp
index dca5d75..5ccfca0 100644
--- a/content/shell/renderer/test_runner/TestInterfaces.cpp
+++ b/content/shell/renderer/test_runner/TestInterfaces.cpp
@@ -24,17 +24,16 @@
#include "third_party/WebKit/public/web/WebView.h"
using namespace blink;
-using namespace content;
using namespace std;
-namespace WebTestRunner {
+namespace content {
TestInterfaces::TestInterfaces()
- : m_accessibilityController(new content::AccessibilityController())
- , m_eventSender(new content::EventSender(this))
- , m_gamepadController(new content::GamepadController())
- , m_textInputController(new content::TextInputController())
- , m_testRunner(new content::TestRunner(this))
+ : m_accessibilityController(new AccessibilityController())
+ , m_eventSender(new EventSender(this))
+ , m_gamepadController(new GamepadController())
+ , m_textInputController(new TextInputController())
+ , m_testRunner(new TestRunner(this))
, m_delegate(0)
{
blink::setLayoutTestMode(true);
@@ -158,17 +157,17 @@ void TestInterfaces::windowClosed(WebTestProxyBase* proxy)
m_windowList.erase(pos);
}
-content::AccessibilityController* TestInterfaces::accessibilityController()
+AccessibilityController* TestInterfaces::accessibilityController()
{
return m_accessibilityController.get();
}
-content::EventSender* TestInterfaces::eventSender()
+EventSender* TestInterfaces::eventSender()
{
return m_eventSender.get();
}
-content::TestRunner* TestInterfaces::testRunner()
+TestRunner* TestInterfaces::testRunner()
{
return m_testRunner.get();
}
@@ -202,4 +201,4 @@ WebThemeEngine* TestInterfaces::themeEngine()
return m_themeEngine.get();
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/TestInterfaces.h b/content/shell/renderer/test_runner/TestInterfaces.h
index a287e27..0a6639a 100644
--- a/content/shell/renderer/test_runner/TestInterfaces.h
+++ b/content/shell/renderer/test_runner/TestInterfaces.h
@@ -25,24 +25,21 @@ class WebView;
}
namespace content {
+
class AccessibilityController;
class EventSender;
class GamepadController;
class TestRunner;
class TextInputController;
-class WebTestProxyBase;
-}
-
-namespace WebTestRunner {
-
class WebTestDelegate;
+class WebTestProxyBase;
class TestInterfaces {
public:
TestInterfaces();
~TestInterfaces();
- void setWebView(blink::WebView*, content::WebTestProxyBase*);
+ void setWebView(blink::WebView*, WebTestProxyBase*);
void setDelegate(WebTestDelegate*);
void bindTo(blink::WebFrame*);
void resetTestHelperControllers();
@@ -50,27 +47,27 @@ public:
void setTestIsRunning(bool);
void configureForTestWithURL(const blink::WebURL&, bool generatePixels);
- void windowOpened(content::WebTestProxyBase*);
- void windowClosed(content::WebTestProxyBase*);
+ void windowOpened(WebTestProxyBase*);
+ void windowClosed(WebTestProxyBase*);
- content::AccessibilityController* accessibilityController();
- content::EventSender* eventSender();
- content::TestRunner* testRunner();
+ AccessibilityController* accessibilityController();
+ EventSender* eventSender();
+ TestRunner* testRunner();
WebTestDelegate* delegate();
- content::WebTestProxyBase* proxy();
- const std::vector<content::WebTestProxyBase*>& windowList();
+ WebTestProxyBase* proxy();
+ const std::vector<WebTestProxyBase*>& windowList();
blink::WebThemeEngine* themeEngine();
private:
- scoped_ptr<content::AccessibilityController> m_accessibilityController;
- scoped_ptr<content::EventSender> m_eventSender;
- scoped_ptr<content::GamepadController> m_gamepadController;
- scoped_ptr<content::TextInputController> m_textInputController;
- scoped_ptr<content::TestRunner> m_testRunner;
+ scoped_ptr<AccessibilityController> m_accessibilityController;
+ scoped_ptr<EventSender> m_eventSender;
+ scoped_ptr<GamepadController> m_gamepadController;
+ scoped_ptr<TextInputController> m_textInputController;
+ scoped_ptr<TestRunner> m_testRunner;
WebTestDelegate* m_delegate;
- content::WebTestProxyBase* m_proxy;
+ WebTestProxyBase* m_proxy;
- std::vector<content::WebTestProxyBase*> m_windowList;
+ std::vector<WebTestProxyBase*> m_windowList;
#if defined(__APPLE__)
scoped_ptr<WebTestThemeEngineMac> m_themeEngine;
#else
@@ -80,6 +77,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(TestInterfaces);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTINTERFACES_H_
diff --git a/content/shell/renderer/test_runner/TestPlugin.cpp b/content/shell/renderer/test_runner/TestPlugin.cpp
index 2606207..db9edc5 100644
--- a/content/shell/renderer/test_runner/TestPlugin.cpp
+++ b/content/shell/renderer/test_runner/TestPlugin.cpp
@@ -27,7 +27,7 @@
using namespace blink;
using namespace std;
-namespace WebTestRunner {
+namespace content {
namespace {
@@ -296,7 +296,7 @@ void TestPlugin::updateGeometry(const WebRect& frameRect, const WebRect& clipRec
} else {
size_t bytes = 4 * m_rect.width * m_rect.height;
scoped_ptr<base::SharedMemory> bitmap =
- content::RenderThread::Get()->HostAllocateSharedMemoryBuffer(bytes);
+ RenderThread::Get()->HostAllocateSharedMemoryBuffer(bytes);
if (!bitmap->Map(bytes)) {
m_textureMailbox = cc::TextureMailbox();
} else {
@@ -690,4 +690,4 @@ bool TestPlugin::isSupportedMimeType(const WebString& mimeType)
|| mimeType == canCreateWithoutRendererMimeType();
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/TestPlugin.h b/content/shell/renderer/test_runner/TestPlugin.h
index d9cd7c6..8c1f06b 100644
--- a/content/shell/renderer/test_runner/TestPlugin.h
+++ b/content/shell/renderer/test_runner/TestPlugin.h
@@ -20,9 +20,9 @@
namespace blink {
class WebFrame;
-} // namespace blink
+}
-namespace WebTestRunner {
+namespace content {
class WebTestDelegate;
@@ -153,6 +153,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(TestPlugin);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TESTPLUGIN_H_
diff --git a/content/shell/renderer/test_runner/WebPermissions.cpp b/content/shell/renderer/test_runner/WebPermissions.cpp
index 77d2f1e..b2cfd74 100644
--- a/content/shell/renderer/test_runner/WebPermissions.cpp
+++ b/content/shell/renderer/test_runner/WebPermissions.cpp
@@ -9,7 +9,6 @@
#include "third_party/WebKit/public/platform/WebCString.h"
#include "third_party/WebKit/public/platform/WebURL.h"
-using namespace WebTestRunner;
using namespace std;
namespace content {
diff --git a/content/shell/renderer/test_runner/WebPermissions.h b/content/shell/renderer/test_runner/WebPermissions.h
index f942d40..85330b6 100644
--- a/content/shell/renderer/test_runner/WebPermissions.h
+++ b/content/shell/renderer/test_runner/WebPermissions.h
@@ -9,12 +9,10 @@
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebPermissionClient.h"
-namespace WebTestRunner {
-class WebTestDelegate;
-}
-
namespace content {
+class WebTestDelegate;
+
class WebPermissions : public blink::WebPermissionClient {
public:
WebPermissions();
@@ -39,11 +37,11 @@ public:
// Resets the policy to allow everything, except for running insecure content.
void reset();
- void setDelegate(WebTestRunner::WebTestDelegate*);
+ void setDelegate(WebTestDelegate*);
void setDumpCallbacks(bool);
private:
- WebTestRunner::WebTestDelegate* m_delegate;
+ WebTestDelegate* m_delegate;
bool m_dumpCallbacks;
bool m_imagesAllowed;
diff --git a/content/shell/renderer/test_runner/WebTask.cpp b/content/shell/renderer/test_runner/WebTask.cpp
index 0a21971..43302e6 100644
--- a/content/shell/renderer/test_runner/WebTask.cpp
+++ b/content/shell/renderer/test_runner/WebTask.cpp
@@ -9,7 +9,7 @@
using namespace std;
-namespace WebTestRunner {
+namespace content {
WebTask::WebTask(WebTaskList* list)
: m_taskList(list)
@@ -50,4 +50,4 @@ void WebTaskList::revokeAll()
m_tasks[0]->cancel();
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/WebTask.h b/content/shell/renderer/test_runner/WebTask.h
index 548cf82..6c7548b 100644
--- a/content/shell/renderer/test_runner/WebTask.h
+++ b/content/shell/renderer/test_runner/WebTask.h
@@ -7,7 +7,7 @@
#include <vector>
-namespace WebTestRunner {
+namespace content {
class WebTaskList;
@@ -72,6 +72,6 @@ protected:
T* m_object;
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTASK_H_
diff --git a/content/shell/renderer/test_runner/WebTestDelegate.h b/content/shell/renderer/test_runner/WebTestDelegate.h
index fa4ef33..a14b5cd 100644
--- a/content/shell/renderer/test_runner/WebTestDelegate.h
+++ b/content/shell/renderer/test_runner/WebTestDelegate.h
@@ -27,13 +27,10 @@ struct WebURLError;
}
namespace content {
-class WebTestProxyBase;
-struct TestPreferences;
-}
-
-namespace WebTestRunner {
class WebTask;
+class WebTestProxyBase;
+struct TestPreferences;
class WebTestDelegate {
public:
@@ -85,7 +82,7 @@ public:
virtual blink::WebURL rewriteLayoutTestsURL(const std::string& utf8URL) = 0;
// Manages the settings to used for layout tests.
- virtual content::TestPreferences* preferences() = 0;
+ virtual TestPreferences* preferences() = 0;
virtual void applyPreferences() = 0;
// Enables or disables synchronous resize mode. When enabled, all window-sizing machinery is
@@ -118,7 +115,7 @@ public:
virtual void setDeviceScaleFactor(float) = 0;
// Controls which WebView should be focused.
- virtual void setFocus(content::WebTestProxyBase*, bool) = 0;
+ virtual void setFocus(WebTestProxyBase*, bool) = 0;
// Controls whether all cookies should be accepted or writing cookies in a
// third-party context is blocked.
@@ -152,9 +149,9 @@ public:
// Returns a text dump the back/forward history for the WebView associated
// with the given WebTestProxyBase.
- virtual std::string dumpHistoryForWindow(content::WebTestProxyBase*) = 0;
+ virtual std::string dumpHistoryForWindow(WebTestProxyBase*) = 0;
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_
diff --git a/content/shell/renderer/test_runner/WebTestInterfaces.cpp b/content/shell/renderer/test_runner/WebTestInterfaces.cpp
index 38a359f..2178aef 100644
--- a/content/shell/renderer/test_runner/WebTestInterfaces.cpp
+++ b/content/shell/renderer/test_runner/WebTestInterfaces.cpp
@@ -12,9 +12,8 @@
#include "content/shell/renderer/test_runner/test_runner.h"
using namespace blink;
-using namespace content;
-namespace WebTestRunner {
+namespace content {
WebTestInterfaces::WebTestInterfaces()
: m_interfaces(new TestInterfaces())
@@ -90,4 +89,4 @@ WebAudioDevice* WebTestInterfaces::createAudioDevice(double sampleRate)
return new MockWebAudioDevice(sampleRate);
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/WebTestInterfaces.h b/content/shell/renderer/test_runner/WebTestInterfaces.h
index cfcc146..83764d4 100644
--- a/content/shell/renderer/test_runner/WebTestInterfaces.h
+++ b/content/shell/renderer/test_runner/WebTestInterfaces.h
@@ -22,13 +22,10 @@ class WebView;
}
namespace content {
-class WebTestProxyBase;
-}
-
-namespace WebTestRunner {
class TestInterfaces;
class WebTestDelegate;
+class WebTestProxyBase;
class WebTestRunner;
class WebTestInterfaces {
@@ -36,7 +33,7 @@ public:
WebTestInterfaces();
~WebTestInterfaces();
- void setWebView(blink::WebView*, content::WebTestProxyBase*);
+ void setWebView(blink::WebView*, WebTestProxyBase*);
void setDelegate(WebTestDelegate*);
void bindTo(blink::WebFrame*);
void resetAll();
@@ -59,6 +56,6 @@ private:
scoped_ptr<TestInterfaces> m_interfaces;
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTINTERFACES_H_
diff --git a/content/shell/renderer/test_runner/WebTestProxy.cpp b/content/shell/renderer/test_runner/WebTestProxy.cpp
index 0c9b8cb..02cdbd4 100644
--- a/content/shell/renderer/test_runner/WebTestProxy.cpp
+++ b/content/shell/renderer/test_runner/WebTestProxy.cpp
@@ -45,7 +45,6 @@
#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
#include "third_party/WebKit/public/web/WebView.h"
-using namespace WebTestRunner;
using namespace blink;
using namespace std;
diff --git a/content/shell/renderer/test_runner/WebTestProxy.h b/content/shell/renderer/test_runner/WebTestProxy.h
index 47671e4..7ecb38a 100644
--- a/content/shell/renderer/test_runner/WebTestProxy.h
+++ b/content/shell/renderer/test_runner/WebTestProxy.h
@@ -71,23 +71,20 @@ struct WebWindowFeatures;
typedef unsigned WebColor;
}
-namespace WebTestRunner {
+namespace content {
+
class MockWebSpeechRecognizer;
+class RenderFrame;
+class SpellCheckClient;
class TestInterfaces;
class WebTestDelegate;
class WebTestInterfaces;
class WebUserMediaClientMock;
-}
-
-namespace content {
-
-class RenderFrame;
-class SpellCheckClient;
class WebTestProxyBase : public blink::WebCompositeAndReadbackAsyncCallback {
public:
- void setInterfaces(WebTestRunner::WebTestInterfaces*);
- void setDelegate(WebTestRunner::WebTestDelegate*);
+ void setInterfaces(WebTestInterfaces*);
+ void setDelegate(WebTestDelegate*);
void setWidget(blink::WebWidget*);
void reset();
@@ -118,9 +115,9 @@ public:
void discardBackingStore();
blink::WebMIDIClientMock* midiClientMock();
- WebTestRunner::MockWebSpeechRecognizer* speechRecognizerMock();
+ MockWebSpeechRecognizer* speechRecognizerMock();
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
+ WebTaskList* taskList() { return &m_taskList; }
blink::WebView* webView();
@@ -201,14 +198,14 @@ private:
blink::WebWidget* webWidget();
- WebTestRunner::TestInterfaces* m_testInterfaces;
- ::WebTestRunner::WebTestDelegate* m_delegate;
+ TestInterfaces* m_testInterfaces;
+ WebTestDelegate* m_delegate;
blink::WebWidget* m_webWidget;
- WebTestRunner::WebTaskList m_taskList;
+ WebTaskList m_taskList;
scoped_ptr<SpellCheckClient> m_spellcheck;
- scoped_ptr<WebTestRunner::WebUserMediaClientMock> m_userMediaClient;
+ scoped_ptr<WebUserMediaClientMock> m_userMediaClient;
// Painting.
scoped_ptr<SkCanvas> m_canvas;
@@ -223,7 +220,7 @@ private:
int m_chooserCount;
scoped_ptr<blink::WebMIDIClientMock> m_midiClient;
- scoped_ptr<WebTestRunner::MockWebSpeechRecognizer> m_speechRecognizer;
+ scoped_ptr<MockWebSpeechRecognizer> m_speechRecognizer;
private:
DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase);
diff --git a/content/shell/renderer/test_runner/WebTestRunner.h b/content/shell/renderer/test_runner/WebTestRunner.h
index e8305c9..1693946 100644
--- a/content/shell/renderer/test_runner/WebTestRunner.h
+++ b/content/shell/renderer/test_runner/WebTestRunner.h
@@ -11,7 +11,7 @@ namespace blink {
class WebPermissionClient;
}
-namespace WebTestRunner {
+namespace content {
class WebTestRunner {
public:
@@ -37,6 +37,6 @@ public:
virtual bool shouldGeneratePixelResults() = 0;
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTRUNNER_H_
diff --git a/content/shell/renderer/test_runner/WebTestThemeEngineMac.h b/content/shell/renderer/test_runner/WebTestThemeEngineMac.h
index 2583e81..5b78917 100644
--- a/content/shell/renderer/test_runner/WebTestThemeEngineMac.h
+++ b/content/shell/renderer/test_runner/WebTestThemeEngineMac.h
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "third_party/WebKit/public/platform/WebThemeEngine.h"
-namespace WebTestRunner {
+namespace content {
class WebTestThemeEngineMac : public blink::WebThemeEngine {
public:
@@ -43,6 +43,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(WebTestThemeEngineMac);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTTHEMEENGINEMAC_H_
diff --git a/content/shell/renderer/test_runner/WebTestThemeEngineMac.mm b/content/shell/renderer/test_runner/WebTestThemeEngineMac.mm
index 6a3cb70..3ec0555 100644
--- a/content/shell/renderer/test_runner/WebTestThemeEngineMac.mm
+++ b/content/shell/renderer/test_runner/WebTestThemeEngineMac.mm
@@ -67,7 +67,7 @@ static NSWindow* alwaysInactiveWindow = nil;
@end
-namespace WebTestRunner {
+namespace content {
namespace {
@@ -83,7 +83,7 @@ ThemeTrackEnableState stateToHIEnableState(WebThemeEngine::State state)
}
}
-}
+} // namespace
void WebTestThemeEngineMac::paintScrollbarThumb(
WebCanvas* canvas,
@@ -174,4 +174,4 @@ void WebTestThemeEngineMac::paintNSScrollerScrollbarThumb(
[NSGraphicsContext restoreGraphicsState];
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/WebTestThemeEngineMock.cpp b/content/shell/renderer/test_runner/WebTestThemeEngineMock.cpp
index 654371f..15f6c1c 100644
--- a/content/shell/renderer/test_runner/WebTestThemeEngineMock.cpp
+++ b/content/shell/renderer/test_runner/WebTestThemeEngineMock.cpp
@@ -15,7 +15,7 @@ using blink::WebColor;
using blink::WebRect;
using blink::WebThemeEngine;
-namespace WebTestRunner {
+namespace content {
static const SkColor edgeColor = SK_ColorBLACK;
static const SkColor readOnlyColor = SkColorSetRGB(0xe9, 0xc2, 0xa6);
@@ -645,4 +645,4 @@ void WebTestThemeEngineMock::paint(
}
}
-} // namespace WebTestRunner
+} // namespace content
diff --git a/content/shell/renderer/test_runner/WebTestThemeEngineMock.h b/content/shell/renderer/test_runner/WebTestThemeEngineMock.h
index 45c7961..5ea721d 100644
--- a/content/shell/renderer/test_runner/WebTestThemeEngineMock.h
+++ b/content/shell/renderer/test_runner/WebTestThemeEngineMock.h
@@ -8,25 +8,22 @@
#include "third_party/WebKit/public/platform/WebRect.h"
#include "third_party/WebKit/public/platform/WebThemeEngine.h"
-using blink::WebRect;
-using blink::WebThemeEngine;
-
-namespace WebTestRunner {
+namespace content {
class WebTestThemeEngineMock : public blink::WebThemeEngine {
public:
virtual ~WebTestThemeEngineMock() { }
// WebThemeEngine methods:
- virtual blink::WebSize getSize(WebThemeEngine::Part);
+ virtual blink::WebSize getSize(blink::WebThemeEngine::Part);
virtual void paint(blink::WebCanvas*,
- WebThemeEngine::Part,
- WebThemeEngine::State,
+ blink::WebThemeEngine::Part,
+ blink::WebThemeEngine::State,
const blink::WebRect&,
- const WebThemeEngine::ExtraParams*);
+ const blink::WebThemeEngine::ExtraParams*);
};
-} // namespace WebTestRunner
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTTHEMEENGINEMOCK_H_
diff --git a/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp b/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp
index fe1701d..03d3abe 100644
--- a/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp
+++ b/content/shell/renderer/test_runner/WebUserMediaClientMock.cpp
@@ -20,9 +20,7 @@
using namespace blink;
-using content::MockConstraints;
-
-namespace WebTestRunner {
+namespace content {
class UserMediaRequestTask : public WebMethodTask<WebUserMediaClientMock> {
public:
@@ -178,4 +176,4 @@ void WebUserMediaClientMock::cancelMediaDevicesRequest(const WebMediaDevicesRequ
{
}
-}
+} // namespace content
diff --git a/content/shell/renderer/test_runner/WebUserMediaClientMock.h b/content/shell/renderer/test_runner/WebUserMediaClientMock.h
index e8f2e83..8124e8c 100644
--- a/content/shell/renderer/test_runner/WebUserMediaClientMock.h
+++ b/content/shell/renderer/test_runner/WebUserMediaClientMock.h
@@ -12,7 +12,7 @@
#include "third_party/WebKit/public/platform/WebURL.h"
#include "third_party/WebKit/public/web/WebUserMediaClient.h"
-namespace WebTestRunner {
+namespace content {
class WebTestDelegate;
@@ -36,6 +36,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(WebUserMediaClientMock);
};
-}
+} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBUSERMEDIACLIENTMOCK_H_
diff --git a/content/shell/renderer/test_runner/accessibility_controller.cc b/content/shell/renderer/test_runner/accessibility_controller.cc
index 430e00c..c937a69 100644
--- a/content/shell/renderer/test_runner/accessibility_controller.cc
+++ b/content/shell/renderer/test_runner/accessibility_controller.cc
@@ -202,8 +202,7 @@ void AccessibilityController::NotificationReceived(
argv);
}
-void AccessibilityController::SetDelegate(
- WebTestRunner::WebTestDelegate* delegate) {
+void AccessibilityController::SetDelegate(WebTestDelegate* delegate) {
delegate_ = delegate;
}
diff --git a/content/shell/renderer/test_runner/accessibility_controller.h b/content/shell/renderer/test_runner/accessibility_controller.h
index 30e0131..5ea475f 100644
--- a/content/shell/renderer/test_runner/accessibility_controller.h
+++ b/content/shell/renderer/test_runner/accessibility_controller.h
@@ -18,12 +18,10 @@ class WebString;
class WebView;
}
-namespace WebTestRunner {
-class WebTestDelegate;
-}
-
namespace content {
+class WebTestDelegate;
+
class AccessibilityController :
public base::SupportsWeakPtr<AccessibilityController> {
public:
@@ -37,7 +35,7 @@ class AccessibilityController :
void NotificationReceived(const blink::WebAXObject& target,
const std::string& notification_name);
- void SetDelegate(WebTestRunner::WebTestDelegate* delegate);
+ void SetDelegate(WebTestDelegate* delegate);
void SetWebView(blink::WebView* web_view);
private:
@@ -64,7 +62,7 @@ class AccessibilityController :
v8::Persistent<v8::Function> notification_callback_;
- WebTestRunner::WebTestDelegate* delegate_;
+ WebTestDelegate* delegate_;
blink::WebView* web_view_;
base::WeakPtrFactory<AccessibilityController> weak_factory_;
diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc
index 07061df..8269002 100644
--- a/content/shell/renderer/test_runner/event_sender.cc
+++ b/content/shell/renderer/test_runner/event_sender.cc
@@ -138,7 +138,7 @@ bool OutsideMultiClickRadius(const WebPoint& a, const WebPoint& b) {
// helpful.
std::vector<std::string> MakeMenuItemStringsFor(
WebContextMenuData* context_menu,
- WebTestRunner::WebTestDelegate* delegate) {
+ WebTestDelegate* delegate) {
// These constants are based on Safari's context menu because tests are made
// for it.
static const char* kNonEditableMenuStrings[] = {
@@ -203,7 +203,7 @@ WebMouseEvent::Button GetButtonTypeFromButtonNumber(int button_code) {
return WebMouseEvent::ButtonMiddle;
}
-class MouseDownTask : public WebTestRunner::WebMethodTask<EventSender> {
+class MouseDownTask : public WebMethodTask<EventSender> {
public:
MouseDownTask(EventSender* obj, int button_number, int modifiers)
: WebMethodTask<EventSender>(obj),
@@ -219,7 +219,7 @@ class MouseDownTask : public WebTestRunner::WebMethodTask<EventSender> {
int modifiers_;
};
-class MouseUpTask : public WebTestRunner::WebMethodTask<EventSender> {
+class MouseUpTask : public WebMethodTask<EventSender> {
public:
MouseUpTask(EventSender* obj, int button_number, int modifiers)
: WebMethodTask<EventSender>(obj),
@@ -235,7 +235,7 @@ class MouseUpTask : public WebTestRunner::WebMethodTask<EventSender> {
int modifiers_;
};
-class KeyDownTask : public WebTestRunner::WebMethodTask<EventSender> {
+class KeyDownTask : public WebMethodTask<EventSender> {
public:
KeyDownTask(EventSender* obj,
const std::string code_str,
@@ -1007,7 +1007,7 @@ EventSender::SavedEvent::SavedEvent()
milliseconds(0),
modifiers(0) {}
-EventSender::EventSender(WebTestRunner::TestInterfaces* interfaces)
+EventSender::EventSender(TestInterfaces* interfaces)
: interfaces_(interfaces),
delegate_(NULL),
view_(NULL),
@@ -1079,7 +1079,7 @@ void EventSender::Install(WebFrame* frame) {
EventSenderBindings::Install(weak_factory_.GetWeakPtr(), frame);
}
-void EventSender::SetDelegate(WebTestRunner::WebTestDelegate* delegate) {
+void EventSender::SetDelegate(WebTestDelegate* delegate) {
delegate_ = delegate;
}
@@ -1402,7 +1402,7 @@ void EventSender::SetPageZoomFactor(double zoom_factor) {
for (size_t i = 0; i < window_list.size(); ++i) {
window_list.at(i)->webView()->setZoomLevel(
- content::ZoomFactorToZoomLevel(zoom_factor));
+ ZoomFactorToZoomLevel(zoom_factor));
}
}
diff --git a/content/shell/renderer/test_runner/event_sender.h b/content/shell/renderer/test_runner/event_sender.h
index b9f2922..3b2c7ef 100644
--- a/content/shell/renderer/test_runner/event_sender.h
+++ b/content/shell/renderer/test_runner/event_sender.h
@@ -30,12 +30,10 @@ namespace gin {
class Arguments;
}
-namespace WebTestRunner {
+namespace content {
+
class TestInterfaces;
class WebTestDelegate;
-}
-
-namespace content {
// Key event location code introduced in DOM Level 3.
// See also: http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboardevents
@@ -48,12 +46,12 @@ enum KeyLocationCode {
class EventSender : public base::SupportsWeakPtr<EventSender> {
public:
- explicit EventSender(WebTestRunner::TestInterfaces*);
+ explicit EventSender(TestInterfaces*);
virtual ~EventSender();
void Reset();
void Install(blink::WebFrame*);
- void SetDelegate(WebTestRunner::WebTestDelegate*);
+ void SetDelegate(WebTestDelegate*);
void SetWebView(blink::WebView*);
void SetContextMenuData(const blink::WebContextMenuData&);
@@ -66,7 +64,7 @@ class EventSender : public base::SupportsWeakPtr<EventSender> {
int modifiers,
KeyLocationCode location);
- WebTestRunner::WebTaskList* taskList() { return &task_list_; }
+ WebTaskList* taskList() { return &task_list_; }
private:
friend class EventSenderBindings;
@@ -221,10 +219,10 @@ class EventSender : public base::SupportsWeakPtr<EventSender> {
int wm_sys_dead_char_;
#endif
- WebTestRunner::WebTaskList task_list_;
+ WebTaskList task_list_;
- WebTestRunner::TestInterfaces* interfaces_;
- WebTestRunner::WebTestDelegate* delegate_;
+ TestInterfaces* interfaces_;
+ WebTestDelegate* delegate_;
blink::WebView* view_;
bool force_layout_on_events_;
diff --git a/content/shell/renderer/test_runner/gamepad_controller.cc b/content/shell/renderer/test_runner/gamepad_controller.cc
index f03651b..7efe712 100644
--- a/content/shell/renderer/test_runner/gamepad_controller.cc
+++ b/content/shell/renderer/test_runner/gamepad_controller.cc
@@ -150,7 +150,7 @@ void GamepadController::Install(WebFrame* frame) {
GamepadControllerBindings::Install(weak_factory_.GetWeakPtr(), frame);
}
-void GamepadController::SetDelegate(WebTestRunner::WebTestDelegate* delegate) {
+void GamepadController::SetDelegate(WebTestDelegate* delegate) {
delegate_ = delegate;
}
diff --git a/content/shell/renderer/test_runner/gamepad_controller.h b/content/shell/renderer/test_runner/gamepad_controller.h
index f38fc32..b648fd0 100644
--- a/content/shell/renderer/test_runner/gamepad_controller.h
+++ b/content/shell/renderer/test_runner/gamepad_controller.h
@@ -12,12 +12,10 @@ namespace blink {
class WebFrame;
}
-namespace WebTestRunner {
-class WebTestDelegate;
-}
-
namespace content {
+class WebTestDelegate;
+
class GamepadController : public base::SupportsWeakPtr<GamepadController> {
public:
GamepadController();
@@ -25,7 +23,7 @@ class GamepadController : public base::SupportsWeakPtr<GamepadController> {
void Reset();
void Install(blink::WebFrame* frame);
- void SetDelegate(WebTestRunner::WebTestDelegate* delegate);
+ void SetDelegate(WebTestDelegate* delegate);
private:
friend class GamepadControllerBindings;
@@ -48,7 +46,7 @@ class GamepadController : public base::SupportsWeakPtr<GamepadController> {
blink::WebGamepads gamepads_;
- WebTestRunner::WebTestDelegate* delegate_;
+ WebTestDelegate* delegate_;
base::WeakPtrFactory<GamepadController> weak_factory_;
diff --git a/content/shell/renderer/test_runner/notification_presenter.h b/content/shell/renderer/test_runner/notification_presenter.h
index b0934cd..083223a 100644
--- a/content/shell/renderer/test_runner/notification_presenter.h
+++ b/content/shell/renderer/test_runner/notification_presenter.h
@@ -12,12 +12,10 @@
#include "third_party/WebKit/public/web/WebNotification.h"
#include "third_party/WebKit/public/web/WebNotificationPresenter.h"
-namespace WebTestRunner {
-class WebTestDelegate;
-}
-
namespace content {
+class WebTestDelegate;
+
// A class that implements WebNotificationPresenter for the TestRunner library.
class NotificationPresenter : public blink::WebNotificationPresenter {
public:
@@ -33,9 +31,7 @@ class NotificationPresenter : public blink::WebNotificationPresenter {
// Called by the TestRunner to reset the presenter to an default state.
void Reset();
- void set_delegate(WebTestRunner::WebTestDelegate* delegate) {
- delegate_ = delegate;
- }
+ void set_delegate(WebTestDelegate* delegate) { delegate_ = delegate; }
// blink::WebNotificationPresenter interface
virtual bool show(const blink::WebNotification& notification);
@@ -48,7 +44,7 @@ class NotificationPresenter : public blink::WebNotificationPresenter {
blink::WebNotificationPermissionCallback* callback);
private:
- WebTestRunner::WebTestDelegate* delegate_;
+ WebTestDelegate* delegate_;
// Map of known origins and whether they are allowed to show notifications.
typedef std::map<std::string, bool> KnownOriginMap;
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index 5a0bc05..73c7fac 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -47,7 +47,8 @@
#endif
using namespace blink;
-using namespace WebTestRunner;
+
+namespace content {
namespace {
@@ -58,12 +59,11 @@ WebString V8StringToWebString(v8::Handle<v8::String> v8_str) {
return WebString::fromUTF8(chars.get());
}
-class HostMethodTask :
- public ::WebTestRunner::WebMethodTask<content::TestRunner> {
+class HostMethodTask : public WebMethodTask<TestRunner> {
public:
- typedef void (content::TestRunner::*CallbackMethodType)();
- HostMethodTask(content::TestRunner* object, CallbackMethodType callback)
- : WebMethodTask<content::TestRunner>(object), callback_(callback) {}
+ typedef void (TestRunner::*CallbackMethodType)();
+ HostMethodTask(TestRunner* object, CallbackMethodType callback)
+ : WebMethodTask<TestRunner>(object), callback_(callback) {}
virtual void runIfValid() OVERRIDE {
(m_object->*callback_)();
@@ -75,13 +75,10 @@ class HostMethodTask :
} // namespace
-namespace content {
-
-class InvokeCallbackTask : public WebMethodTask<content::TestRunner> {
+class InvokeCallbackTask : public WebMethodTask<TestRunner> {
public:
- InvokeCallbackTask(content::TestRunner* object,
- v8::Handle<v8::Function> callback)
- : WebMethodTask<content::TestRunner>(object),
+ InvokeCallbackTask(TestRunner* object, v8::Handle<v8::Function> callback)
+ : WebMethodTask<TestRunner>(object),
callback_(blink::mainThreadIsolate(), callback) {}
virtual void runIfValid() OVERRIDE {
@@ -1353,7 +1350,7 @@ TestRunner::TestRunner(TestInterfaces* interfaces)
web_view_(NULL),
page_overlay_(NULL),
web_permissions_(new WebPermissions()),
- notification_presenter_(new content::NotificationPresenter()),
+ notification_presenter_(new NotificationPresenter()),
weak_factory_(this) {}
TestRunner::~TestRunner() {}
diff --git a/content/shell/renderer/test_runner/test_runner.h b/content/shell/renderer/test_runner/test_runner.h
index 0f87f72..1859a11 100644
--- a/content/shell/renderer/test_runner/test_runner.h
+++ b/content/shell/renderer/test_runner/test_runner.h
@@ -28,33 +28,30 @@ class ArrayBufferView;
class Arguments;
}
-namespace WebTestRunner {
-class TestInterfaces;
-class WebTestDelegate;
-}
-
namespace content {
class InvokeCallbackTask;
class NotificationPresenter;
+class TestInterfaces;
class TestPageOverlay;
class WebPermissions;
+class WebTestDelegate;
class WebTestProxyBase;
-class TestRunner : public ::WebTestRunner::WebTestRunner,
+class TestRunner : public WebTestRunner,
public base::SupportsWeakPtr<TestRunner> {
public:
- explicit TestRunner(::WebTestRunner::TestInterfaces*);
+ explicit TestRunner(TestInterfaces*);
virtual ~TestRunner();
void Install(blink::WebFrame* frame);
- void SetDelegate(::WebTestRunner::WebTestDelegate*);
+ void SetDelegate(WebTestDelegate*);
void SetWebView(blink::WebView*, WebTestProxyBase*);
void Reset();
- ::WebTestRunner::WebTaskList* taskList() { return &task_list_; }
+ WebTaskList* taskList() { return &task_list_; }
void SetTestIsRunning(bool);
bool TestIsRunning() const { return test_is_running_; }
@@ -127,7 +124,7 @@ class TestRunner : public ::WebTestRunner::WebTestRunner,
virtual ~WorkItem() {}
// Returns true if this started a load.
- virtual bool Run(::WebTestRunner::WebTestDelegate*, blink::WebView*) = 0;
+ virtual bool Run(WebTestDelegate*, blink::WebView*) = 0;
};
private:
@@ -150,20 +147,19 @@ class TestRunner : public ::WebTestRunner::WebTestRunner,
void set_frozen(bool frozen) { frozen_ = frozen; }
bool is_empty() { return queue_.empty(); }
- ::WebTestRunner::WebTaskList* taskList() { return &task_list_; }
+ WebTaskList* taskList() { return &task_list_; }
private:
void ProcessWork();
- class WorkQueueTask : public ::WebTestRunner::WebMethodTask<WorkQueue> {
+ class WorkQueueTask : public WebMethodTask<WorkQueue> {
public:
- WorkQueueTask(WorkQueue* object) :
- ::WebTestRunner::WebMethodTask<WorkQueue>(object) { }
+ WorkQueueTask(WorkQueue* object) : WebMethodTask<WorkQueue>(object) {}
virtual void runIfValid() OVERRIDE;
};
- ::WebTestRunner::WebTaskList task_list_;
+ WebTaskList task_list_;
std::deque<WorkItem*> queue_;
bool frozen_;
TestRunner* controller_;
@@ -678,10 +674,10 @@ class TestRunner : public ::WebTestRunner::WebTestRunner,
std::vector<unsigned char> audio_data_;
// Used for test timeouts.
- ::WebTestRunner::WebTaskList task_list_;
+ WebTaskList task_list_;
- ::WebTestRunner::TestInterfaces* test_interfaces_;
- ::WebTestRunner::WebTestDelegate* delegate_;
+ TestInterfaces* test_interfaces_;
+ WebTestDelegate* delegate_;
blink::WebView* web_view_;
TestPageOverlay* page_overlay_;
WebTestProxyBase* proxy_;
diff --git a/content/shell/renderer/webkit_test_runner.cc b/content/shell/renderer/webkit_test_runner.cc
index 61c3efa..73dd10f 100644
--- a/content/shell/renderer/webkit_test_runner.cc
+++ b/content/shell/renderer/webkit_test_runner.cc
@@ -87,8 +87,6 @@ using blink::WebScreenOrientationType;
using blink::WebTestingSupport;
using blink::WebVector;
using blink::WebView;
-using WebTestRunner::WebTask;
-using WebTestRunner::WebTestInterfaces;
namespace content {
diff --git a/content/shell/renderer/webkit_test_runner.h b/content/shell/renderer/webkit_test_runner.h
index 8cca37d..a4e6340 100644
--- a/content/shell/renderer/webkit_test_runner.h
+++ b/content/shell/renderer/webkit_test_runner.h
@@ -36,7 +36,7 @@ struct LeakDetectionResult;
// This is the renderer side of the webkit test runner.
class WebKitTestRunner : public RenderViewObserver,
public RenderViewObserverTracker<WebKitTestRunner>,
- public WebTestRunner::WebTestDelegate {
+ public WebTestDelegate {
public:
explicit WebKitTestRunner(RenderView* render_view);
virtual ~WebKitTestRunner();
@@ -67,9 +67,8 @@ class WebKitTestRunner : public RenderViewObserver,
virtual void setScreenOrientation(
const blink::WebScreenOrientationType& orientation) OVERRIDE;
virtual void printMessage(const std::string& message) OVERRIDE;
- virtual void postTask(::WebTestRunner::WebTask* task) OVERRIDE;
- virtual void postDelayedTask(::WebTestRunner::WebTask* task,
- long long ms) OVERRIDE;
+ virtual void postTask(WebTask* task) OVERRIDE;
+ virtual void postDelayedTask(WebTask* task, long long ms) OVERRIDE;
virtual blink::WebString registerIsolatedFileSystem(
const blink::WebVector<blink::WebString>& absolute_filenames) OVERRIDE;
virtual long long getCurrentTimeInMillisecond() OVERRIDE;
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index 6bbbea9..f8d9a3a 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -197,8 +197,7 @@ std::string DumpHistoryItem(HistoryEntry::HistoryNode* node,
result.append(indent, ' ');
}
- std::string url =
- WebTestRunner::normalizeLayoutTestURL(item.urlString().utf8());
+ std::string url = normalizeLayoutTestURL(item.urlString().utf8());
result.append(url);
if (!item.target().isEmpty()) {
result.append(" (in frame \"");