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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp

Issue 1413233005: tracing: Report ResourceClients and the reason for not deletable for web-caches (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reflected haraken's comments. Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSCrossfadeValue.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 ResourcePtr<ScriptResource> m_resource; 129 ResourcePtr<ScriptResource> m_resource;
130 OwnPtrWillBePersistent<PendingScriptWrapper> m_pendingScript; 130 OwnPtrWillBePersistent<PendingScriptWrapper> m_pendingScript;
131 }; 131 };
132 132
133 class TestScriptResourceClient : public ScriptResourceClient { 133 class TestScriptResourceClient : public ScriptResourceClient {
134 public: 134 public:
135 TestScriptResourceClient() 135 TestScriptResourceClient()
136 : m_finished(false) { } 136 : m_finished(false) { }
137 137
138 void notifyFinished(Resource*) override { m_finished = true; } 138 void notifyFinished(Resource*) override { m_finished = true; }
139 String debugName() const override { return "TestScriptResourceClient"; }
139 140
140 bool finished() const { return m_finished; } 141 bool finished() const { return m_finished; }
141 142
142 private: 143 private:
143 bool m_finished; 144 bool m_finished;
144 }; 145 };
145 146
146 TEST_F(ScriptStreamingTest, CompilingStreamedScript) 147 TEST_F(ScriptStreamingTest, CompilingStreamedScript)
147 { 148 {
148 // Test that we can successfully compile a streamed script. 149 // Test that we can successfully compile a streamed script.
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 EXPECT_TRUE(sourceCode.streamer()); 389 EXPECT_TRUE(sourceCode.streamer());
389 v8::TryCatch tryCatch; 390 v8::TryCatch tryCatch;
390 v8::Local<v8::Script> script; 391 v8::Local<v8::Script> script;
391 EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, isolate()).ToLocal(&sc ript)); 392 EXPECT_TRUE(V8ScriptRunner::compileScript(sourceCode, isolate()).ToLocal(&sc ript));
392 EXPECT_FALSE(tryCatch.HasCaught()); 393 EXPECT_FALSE(tryCatch.HasCaught());
393 } 394 }
394 395
395 } // namespace 396 } // namespace
396 397
397 } // namespace blink 398 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/CSSCrossfadeValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698