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

Side by Side Diff: third_party/WebKit/Source/core/dom/DocumentTest.cpp

Issue 2321223003: Revert of Move collectGarbage* methods to ThreadState (Closed)
Patch Set: Created 4 years, 3 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 /* 1 /*
2 * Copyright (c) 2014, Google Inc. All rights reserved. 2 * Copyright (c) 2014, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include <memory> 43 #include <memory>
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class DocumentTest : public ::testing::Test { 47 class DocumentTest : public ::testing::Test {
48 protected: 48 protected:
49 void SetUp() override; 49 void SetUp() override;
50 50
51 void TearDown() override 51 void TearDown() override
52 { 52 {
53 ThreadState::current()-> collectAllGarbage(); 53 ThreadHeap::collectAllGarbage();
54 } 54 }
55 55
56 Document& document() const { return m_dummyPageHolder->document(); } 56 Document& document() const { return m_dummyPageHolder->document(); }
57 Page& page() const { return m_dummyPageHolder->page(); } 57 Page& page() const { return m_dummyPageHolder->page(); }
58 58
59 void setHtmlInnerHTML(const char*); 59 void setHtmlInnerHTML(const char*);
60 60
61 private: 61 private:
62 std::unique_ptr<DummyPageHolder> m_dummyPageHolder; 62 std::unique_ptr<DummyPageHolder> m_dummyPageHolder;
63 }; 63 };
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 EXPECT_TRUE(document().getSecurityOrigin()->isPotentiallyTrustworthy()); 292 EXPECT_TRUE(document().getSecurityOrigin()->isPotentiallyTrustworthy());
293 293
294 origin = SecurityOrigin::createFromString("https://example.test"); 294 origin = SecurityOrigin::createFromString("https://example.test");
295 document().setSecurityOrigin(origin); 295 document().setSecurityOrigin(origin);
296 document().enforceSandboxFlags(mask); 296 document().enforceSandboxFlags(mask);
297 EXPECT_TRUE(document().getSecurityOrigin()->isUnique()); 297 EXPECT_TRUE(document().getSecurityOrigin()->isUnique());
298 EXPECT_TRUE(document().getSecurityOrigin()->isPotentiallyTrustworthy()); 298 EXPECT_TRUE(document().getSecurityOrigin()->isPotentiallyTrustworthy());
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698