Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / html / parser / HTMLParserThreadTest.cpp
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/html/parser/HTMLParserThread.h"
7
8 #include <gtest/gtest.h>
9
10 namespace {
11
12 using namespace blink;
13
14 TEST(HTMLParserThread, Init)
15 {
16     // The harness has already run init() for us, so tear down the parser first.
17     ASSERT_TRUE(HTMLParserThread::shared());
18     HTMLParserThread::shutdown();
19
20     // Make sure starting the parser thread brings it back to life.
21     ASSERT_FALSE(HTMLParserThread::shared());
22     HTMLParserThread::init();
23     ASSERT_TRUE(HTMLParserThread::shared());
24 }
25
26 } // namespace