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

Side by Side Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp

Issue 2394683005: Remove ASSERT_UNUSED (Closed)
Patch Set: Created 4 years, 2 months 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "modules/compositorworker/CompositorWorkerThread.h" 5 #include "modules/compositorworker/CompositorWorkerThread.h"
6 6
7 #include "bindings/core/v8/ScriptSourceCode.h" 7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/SourceLocation.h" 8 #include "bindings/core/v8/SourceLocation.h"
9 #include "bindings/core/v8/V8GCController.h" 9 #include "bindings/core/v8/V8GCController.h"
10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" 10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 crossThreadUnretained(waitEvent.get()))); 140 crossThreadUnretained(waitEvent.get())));
141 waitEvent->wait(); 141 waitEvent->wait();
142 } 142 }
143 143
144 private: 144 private:
145 void executeScriptInWorker(WorkerThread* worker, WaitableEvent* waitEvent) { 145 void executeScriptInWorker(WorkerThread* worker, WaitableEvent* waitEvent) {
146 WorkerOrWorkletScriptController* scriptController = 146 WorkerOrWorkletScriptController* scriptController =
147 worker->globalScope()->scriptController(); 147 worker->globalScope()->scriptController();
148 bool evaluateResult = scriptController->evaluate( 148 bool evaluateResult = scriptController->evaluate(
149 ScriptSourceCode("var counter = 0; ++counter;")); 149 ScriptSourceCode("var counter = 0; ++counter;"));
150 ASSERT_UNUSED(evaluateResult, evaluateResult); 150 DCHECK(evaluateResult);
151 waitEvent->signal(); 151 waitEvent->signal();
152 } 152 }
153 153
154 std::unique_ptr<DummyPageHolder> m_page; 154 std::unique_ptr<DummyPageHolder> m_page;
155 RefPtr<SecurityOrigin> m_securityOrigin; 155 RefPtr<SecurityOrigin> m_securityOrigin;
156 std::unique_ptr<InProcessWorkerObjectProxy> m_objectProxy; 156 std::unique_ptr<InProcessWorkerObjectProxy> m_objectProxy;
157 CompositorWorkerTestPlatform m_testPlatform; 157 CompositorWorkerTestPlatform m_testPlatform;
158 }; 158 };
159 159
160 TEST_F(CompositorWorkerThreadTest, Basic) { 160 TEST_F(CompositorWorkerThreadTest, Basic) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 ASSERT_TRUE(secondIsolate); 246 ASSERT_TRUE(secondIsolate);
247 EXPECT_EQ(firstIsolate, secondIsolate); 247 EXPECT_EQ(firstIsolate, secondIsolate);
248 248
249 // Verify that the isolate can run some scripts correctly in the second 249 // Verify that the isolate can run some scripts correctly in the second
250 // worker. 250 // worker.
251 checkWorkerCanExecuteScript(secondWorker.get()); 251 checkWorkerCanExecuteScript(secondWorker.get());
252 secondWorker->terminateAndWait(); 252 secondWorker->terminateAndWait();
253 } 253 }
254 254
255 } // namespace blink 255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698