OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "content/public/common/content_switches.h" | 6 #include "content/public/common/content_switches.h" |
7 #include "content/public/test/render_view_test.h" | 7 #include "content/public/test/render_view_test.h" |
8 #include "content/renderer/render_view_impl.h" | 8 #include "content/renderer/render_view_impl.h" |
9 #include "gin/handle.h" | 9 #include "gin/handle.h" |
10 #include "gin/per_isolate_data.h" | 10 #include "gin/per_isolate_data.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class TestGinObject : public gin::Wrappable<TestGinObject> { | 21 class TestGinObject : public gin::Wrappable<TestGinObject> { |
22 public: | 22 public: |
23 static gin::WrapperInfo kWrapperInfo; | 23 static gin::WrapperInfo kWrapperInfo; |
24 | 24 |
25 static gin::Handle<TestGinObject> Create(v8::Isolate* isolate, bool* alive) { | 25 static gin::Handle<TestGinObject> Create(v8::Isolate* isolate, bool* alive) { |
26 return gin::CreateHandle(isolate, new TestGinObject(alive)); | 26 return gin::CreateHandle(isolate, new TestGinObject(alive)); |
27 } | 27 } |
28 | 28 |
29 private: | 29 private: |
30 TestGinObject(bool* alive) : alive_(alive) { *alive_ = true; } | 30 TestGinObject(bool* alive) : alive_(alive) { *alive_ = true; } |
31 virtual ~TestGinObject() { *alive_ = false; } | 31 ~TestGinObject() override { *alive_ = false; } |
32 | 32 |
33 bool* alive_; | 33 bool* alive_; |
34 | 34 |
35 DISALLOW_COPY_AND_ASSIGN(TestGinObject); | 35 DISALLOW_COPY_AND_ASSIGN(TestGinObject); |
36 }; | 36 }; |
37 | 37 |
38 gin::WrapperInfo TestGinObject::kWrapperInfo = { gin::kEmbedderNativeGin }; | 38 gin::WrapperInfo TestGinObject::kWrapperInfo = { gin::kEmbedderNativeGin }; |
39 | 39 |
40 class GinBrowserTest : public RenderViewTest { | 40 class GinBrowserTest : public RenderViewTest { |
41 public: | 41 public: |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // Should not crash. | 77 // Should not crash. |
78 blink::mainThreadIsolate()->LowMemoryNotification(); | 78 blink::mainThreadIsolate()->LowMemoryNotification(); |
79 | 79 |
80 CHECK(!alive); | 80 CHECK(!alive); |
81 } | 81 } |
82 | 82 |
83 } // namespace | 83 } // namespace |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
OLD | NEW |