Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: content/test/layout_tests/runner/MockGrammarCheck.h

Issue 110533009: Import TestRunner library into chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/test/layout_tests/runner/MockGrammarCheck.h
diff --git a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h b/content/test/layout_tests/runner/MockGrammarCheck.h
similarity index 61%
copy from third_party/tcmalloc/vendor/src/base/synchronization_profiling.h
copy to content/test/layout_tests/runner/MockGrammarCheck.h
index cf02c218a111806189f71f7b528a83b5ceb164a4..ac8a163546ab49746090c65263477fc875e0d3cb 100644
--- a/third_party/tcmalloc/vendor/src/base/synchronization_profiling.h
+++ b/content/test/layout_tests/runner/MockGrammarCheck.h
@@ -1,5 +1,9 @@
-/* Copyright (c) 2010, Google Inc.
- * All rights reserved.
+// Copyright 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.
+
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,25 +30,32 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ---
- * Author: Chris Ruemmler
*/
-#ifndef BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
-#define BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
+#ifndef MockGrammarCheck_h
+#define MockGrammarCheck_h
-#include "base/basictypes.h"
+#include <vector>
-namespace base {
+namespace blink {
-// We can do contention-profiling of SpinLocks, but the code is in
-// mutex.cc, which is not always linked in with spinlock. Hence we
-// provide a weak definition, which are used if mutex.cc isn't linked in.
+class WebString;
+struct WebTextCheckingResult;
-// Submit the number of cycles the spinlock spent contending.
-ATTRIBUTE_WEAK extern void SubmitSpinLockProfileData(const void *, int64);
-extern void SubmitSpinLockProfileData(const void *contendedlock,
- int64 wait_cycles) {}
}
-#endif // BASE_AUXILIARY_SYNCHRONIZATION_PROFILING_H_
+
+namespace WebTestRunner {
+
+// A mock implementation of a grammar-checker used for WebKit tests. This class
+// only implements the minimal functionarities required by WebKit tests, i.e.
+// this class just compares the given string with known grammar mistakes in
+// webkit tests and adds grammar markers on them. Even though this is sufficent
+// for webkit tests, this class is not suitable for any other usages.
+class MockGrammarCheck {
+public:
+ static bool checkGrammarOfString(const blink::WebString&, std::vector<blink::WebTextCheckingResult>*);
+};
+
+}
+
+#endif // MockSpellCheck_h

Powered by Google App Engine
This is Rietveld 408576698