summaryrefslogtreecommitdiffstats
path: root/webkit/mocks
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/mocks')
-rw-r--r--webkit/mocks/mock_webhyphenator.cc36
-rw-r--r--webkit/mocks/mock_webhyphenator.h44
2 files changed, 0 insertions, 80 deletions
diff --git a/webkit/mocks/mock_webhyphenator.cc b/webkit/mocks/mock_webhyphenator.cc
deleted file mode 100644
index a148560..0000000
--- a/webkit/mocks/mock_webhyphenator.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/mocks/mock_webhyphenator.h"
-
-#include "base/logging.h"
-#include "base/memory/scoped_handle.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/strings/string_util.h"
-#include "third_party/hyphen/hyphen.h"
-
-namespace webkit_glue {
-
-MockWebHyphenator::MockWebHyphenator()
- : hyphen_dictionary_(NULL) {
-}
-
-MockWebHyphenator::~MockWebHyphenator() {
-}
-
-void MockWebHyphenator::LoadDictionary(base::PlatformFile dict_file) {
-}
-
-bool MockWebHyphenator::canHyphenate(const WebKit::WebString& locale) {
- return false;
-}
-
-size_t MockWebHyphenator::computeLastHyphenLocation(
- const WebKit::WebString& characters,
- size_t before_index,
- const WebKit::WebString& locale) {
- return 0;
-}
-
-} // namespace webkit_glue
diff --git a/webkit/mocks/mock_webhyphenator.h b/webkit/mocks/mock_webhyphenator.h
deleted file mode 100644
index dbc3ed4..0000000
--- a/webkit/mocks/mock_webhyphenator.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_MOCKS_MOCK_WEBHYPHENATOR_H_
-#define WEBKIT_MOCKS_MOCK_WEBHYPHENATOR_H_
-
-#include "base/basictypes.h"
-#include "base/compiler_specific.h"
-#include "base/platform_file.h"
-#include "third_party/WebKit/public/platform/WebHyphenator.h"
-
-typedef struct _HyphenDict HyphenDict;
-
-namespace webkit_glue {
-
-// Implements a simple WebHyphenator that only supports en-US. It is used for
-// layout tests that expect that hyphenator to be available synchronously.
-// Therefore, this class supports synchronous loading of the dictionary as well.
-class MockWebHyphenator : public WebKit::WebHyphenator {
- public:
- MockWebHyphenator();
- virtual ~MockWebHyphenator();
-
- // Loads the hyphenation dictionary. |dict_file| should be an open fd to
- // third_party/hyphen/hyph_en_US.dic.
- void LoadDictionary(base::PlatformFile dict_file);
-
- // WebHyphenator implementation.
- virtual bool canHyphenate(const WebKit::WebString& locale);
- virtual size_t computeLastHyphenLocation(
- const WebKit::WebString& word,
- size_t before_index,
- const WebKit::WebString& locale);
-
- private:
- HyphenDict* hyphen_dictionary_;
-
- DISALLOW_COPY_AND_ASSIGN(MockWebHyphenator);
-};
-
-} // namespace webkit_glue
-
-#endif // WEBKIT_MOCKS_MOCK_WEBHYPHENATOR_H_