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

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

Issue 2433773006: Remove ExecutionContext::activeDOMObjectsAreStopped()
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 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 #include "bindings/core/v8/ScriptPromiseProperty.h" 5 #include "bindings/core/v8/ScriptPromiseProperty.h"
6 6
7 #include "bindings/core/v8/DOMWrapperWorld.h" 7 #include "bindings/core/v8/DOMWrapperWorld.h"
8 #include "bindings/core/v8/ScriptFunction.h" 8 #include "bindings/core/v8/ScriptFunction.h"
9 #include "bindings/core/v8/ScriptPromise.h" 9 #include "bindings/core/v8/ScriptPromise.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 TEST_F(ScriptPromisePropertyGarbageCollectedTest, Resolve_DeadContext) { 368 TEST_F(ScriptPromisePropertyGarbageCollectedTest, Resolve_DeadContext) {
369 { 369 {
370 ScriptState::Scope scope(mainScriptState()); 370 ScriptState::Scope scope(mainScriptState());
371 getProperty() 371 getProperty()
372 ->promise(DOMWrapperWorld::mainWorld()) 372 ->promise(DOMWrapperWorld::mainWorld())
373 .then(notReached(currentScriptState()), 373 .then(notReached(currentScriptState()),
374 notReached(currentScriptState())); 374 notReached(currentScriptState()));
375 } 375 }
376 376
377 destroyContext(); 377 destroyContext();
378 EXPECT_TRUE( 378 EXPECT_TRUE(!getProperty()->getExecutionContext());
379 !getProperty()->getExecutionContext() ||
380 getProperty()->getExecutionContext()->activeDOMObjectsAreStopped());
381 379
382 getProperty()->resolve(new GarbageCollectedScriptWrappable("value")); 380 getProperty()->resolve(new GarbageCollectedScriptWrappable("value"));
383 EXPECT_EQ(Property::Pending, getProperty()->getState()); 381 EXPECT_EQ(Property::Pending, getProperty()->getState());
384 382
385 v8::MicrotasksScope::PerformCheckpoint(v8::Isolate::GetCurrent()); 383 v8::MicrotasksScope::PerformCheckpoint(v8::Isolate::GetCurrent());
386 } 384 }
387 385
388 TEST_F(ScriptPromisePropertyGarbageCollectedTest, Reset) { 386 TEST_F(ScriptPromisePropertyGarbageCollectedTest, Reset) {
389 ScriptPromise oldPromise, newPromise; 387 ScriptPromise oldPromise, newPromise;
390 ScriptValue oldActual, newActual; 388 ScriptValue oldActual, newActual;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 ResolveWithString) { 475 ResolveWithString) {
478 test(String("hello"), "hello", __FILE__, __LINE__); 476 test(String("hello"), "hello", __FILE__, __LINE__);
479 } 477 }
480 478
481 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest, 479 TEST_F(ScriptPromisePropertyNonScriptWrappableResolutionTargetTest,
482 ResolveWithInteger) { 480 ResolveWithInteger) {
483 test(-1, "-1", __FILE__, __LINE__); 481 test(-1, "-1", __FILE__, __LINE__);
484 } 482 }
485 483
486 } // namespace 484 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698