OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 | 5 |
6 #include "config.h" | 6 #include "config.h" |
7 #include "bindings/core/v8/ScriptStreamer.h" | 7 #include "bindings/core/v8/ScriptStreamer.h" |
8 | 8 |
9 #include "bindings/core/v8/ScriptSourceCode.h" | 9 #include "bindings/core/v8/ScriptSourceCode.h" |
10 #include "bindings/core/v8/ScriptStreamerThread.h" | 10 #include "bindings/core/v8/ScriptStreamerThread.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 ResourceRequest m_resourceRequest; | 125 ResourceRequest m_resourceRequest; |
126 ScriptResource* m_resource; | 126 ScriptResource* m_resource; |
127 OwnPtrWillBePersistent<PendingScriptWrapper> m_pendingScript; | 127 OwnPtrWillBePersistent<PendingScriptWrapper> m_pendingScript; |
128 }; | 128 }; |
129 | 129 |
130 class TestScriptResourceClient : public ScriptResourceClient { | 130 class TestScriptResourceClient : public ScriptResourceClient { |
131 public: | 131 public: |
132 TestScriptResourceClient() | 132 TestScriptResourceClient() |
133 : m_finished(false) { } | 133 : m_finished(false) { } |
134 | 134 |
135 virtual void notifyFinished(Resource*) OVERRIDE { m_finished = true; } | 135 virtual void notifyFinished(Resource*) override { m_finished = true; } |
136 | 136 |
137 bool finished() const { return m_finished; } | 137 bool finished() const { return m_finished; } |
138 | 138 |
139 private: | 139 private: |
140 bool m_finished; | 140 bool m_finished; |
141 }; | 141 }; |
142 | 142 |
143 TEST_F(ScriptStreamingTest, CompilingStreamedScript) | 143 TEST_F(ScriptStreamingTest, CompilingStreamedScript) |
144 { | 144 { |
145 // Test that we can successfully compile a streamed script. | 145 // Test that we can successfully compile a streamed script. |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 273 |
274 bool errorOccurred = false; | 274 bool errorOccurred = false; |
275 ScriptSourceCode sourceCode = pendingScript().getSource(KURL(), errorOccurre
d); | 275 ScriptSourceCode sourceCode = pendingScript().getSource(KURL(), errorOccurre
d); |
276 EXPECT_FALSE(errorOccurred); | 276 EXPECT_FALSE(errorOccurred); |
277 EXPECT_FALSE(sourceCode.streamer()); | 277 EXPECT_FALSE(sourceCode.streamer()); |
278 } | 278 } |
279 | 279 |
280 } // namespace | 280 } // namespace |
281 | 281 |
282 } // namespace blink | 282 } // namespace blink |
OLD | NEW |