| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/html/parser/HTMLDocumentParser.h" | 5 #include "core/html/parser/HTMLDocumentParser.h" |
| 6 | 6 |
| 7 #include <memory> |
| 7 #include "core/html/HTMLDocument.h" | 8 #include "core/html/HTMLDocument.h" |
| 8 #include "core/html/parser/TextResourceDecoder.h" | 9 #include "core/html/parser/TextResourceDecoder.h" |
| 9 #include "core/loader/PrerendererClient.h" | 10 #include "core/loader/PrerendererClient.h" |
| 10 #include "core/loader/TextResourceDecoderBuilder.h" | 11 #include "core/loader/TextResourceDecoderBuilder.h" |
| 11 #include "core/testing/DummyPageHolder.h" | 12 #include "core/testing/DummyPageHolder.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 #include <memory> | |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 class TestPrerendererClient : public GarbageCollected<TestPrerendererClient>, | 19 class TestPrerendererClient : public GarbageCollected<TestPrerendererClient>, |
| 20 public PrerendererClient { | 20 public PrerendererClient { |
| 21 USING_GARBAGE_COLLECTED_MIXIN(TestPrerendererClient); | 21 USING_GARBAGE_COLLECTED_MIXIN(TestPrerendererClient); |
| 22 | 22 |
| 23 public: | 23 public: |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 const char kBytes[] = "<ht"; | 79 const char kBytes[] = "<ht"; |
| 80 parser->AppendBytes(kBytes, sizeof(kBytes)); | 80 parser->AppendBytes(kBytes, sizeof(kBytes)); |
| 81 // The bytes are forwarded to the tokenizer. | 81 // The bytes are forwarded to the tokenizer. |
| 82 HTMLParserScriptRunnerHost* script_runner_host = | 82 HTMLParserScriptRunnerHost* script_runner_host = |
| 83 parser->AsHTMLParserScriptRunnerHostForTesting(); | 83 parser->AsHTMLParserScriptRunnerHostForTesting(); |
| 84 EXPECT_FALSE(script_runner_host->HasPreloadScanner()); | 84 EXPECT_FALSE(script_runner_host->HasPreloadScanner()); |
| 85 EXPECT_EQ(HTMLTokenizer::kTagNameState, parser->Tokenizer()->GetState()); | 85 EXPECT_EQ(HTMLTokenizer::kTagNameState, parser->Tokenizer()->GetState()); |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace blink | 88 } // namespace blink |
| OLD | NEW |