summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThreadTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThreadTest.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThreadTest.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThreadTest.cpp b/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThreadTest.cpp
new file mode 100644
index 00000000000..8b742b86dc1
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/core/html/parser/HTMLParserThreadTest.cpp
@@ -0,0 +1,26 @@
+// Copyright 2014 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 "config.h"
+#include "core/html/parser/HTMLParserThread.h"
+
+#include <gtest/gtest.h>
+
+namespace {
+
+using namespace WebCore;
+
+TEST(HTMLParserThread, Init)
+{
+ // The harness has already run init() for us, so tear down the parser first.
+ ASSERT_TRUE(HTMLParserThread::shared());
+ HTMLParserThread::shutdown();
+
+ // Make sure starting the parser thread brings it back to life.
+ ASSERT_FALSE(HTMLParserThread::shared());
+ HTMLParserThread::init();
+ ASSERT_TRUE(HTMLParserThread::shared());
+}
+
+} // namespace