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

Side by Side Diff: extensions/renderer/native_extension_bindings_system_unittest.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « extensions/browser/image_loader.cc ('k') | gin/v8_platform.cc » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "extensions/renderer/native_extension_bindings_system.h" 5 #include "extensions/renderer/native_extension_bindings_system.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "components/crx_file/id_util.h" 10 #include "components/crx_file/id_util.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 script_context_set_ = base::MakeUnique<ScriptContextSet>(&extension_ids_); 92 script_context_set_ = base::MakeUnique<ScriptContextSet>(&extension_ids_);
93 bindings_system_ = base::MakeUnique<NativeExtensionBindingsSystem>( 93 bindings_system_ = base::MakeUnique<NativeExtensionBindingsSystem>(
94 base::Bind(&NativeExtensionBindingsSystemUnittest::MockSendRequestIPC, 94 base::Bind(&NativeExtensionBindingsSystemUnittest::MockSendRequestIPC,
95 base::Unretained(this)), 95 base::Unretained(this)),
96 base::Bind(&NativeExtensionBindingsSystemUnittest::MockSendListenerIPC, 96 base::Bind(&NativeExtensionBindingsSystemUnittest::MockSendListenerIPC,
97 base::Unretained(this))); 97 base::Unretained(this)));
98 APIBindingTest::SetUp(); 98 APIBindingTest::SetUp();
99 } 99 }
100 100
101 void TearDown() override { 101 void TearDown() override {
102 for (const auto& context : raw_script_contexts_) 102 for (auto* context : raw_script_contexts_)
103 script_context_set_->Remove(context); 103 script_context_set_->Remove(context);
104 base::RunLoop().RunUntilIdle(); 104 base::RunLoop().RunUntilIdle();
105 script_context_set_.reset(); 105 script_context_set_.reset();
106 bindings_system_.reset(); 106 bindings_system_.reset();
107 APIBindingTest::TearDown(); 107 APIBindingTest::TearDown();
108 } 108 }
109 109
110 void MockSendRequestIPC(ScriptContext* context, 110 void MockSendRequestIPC(ScriptContext* context,
111 const ExtensionHostMsg_Request_Params& params) { 111 const ExtensionHostMsg_Request_Params& params) {
112 last_params_.name = params.name; 112 last_params_.name = params.name;
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // Respond and validate. 647 // Respond and validate.
648 bindings_system()->HandleResponse(last_params().request_id, true, 648 bindings_system()->HandleResponse(last_params().request_id, true,
649 base::ListValue(), "Some API Error"); 649 base::ListValue(), "Some API Error");
650 650
651 EXPECT_EQ("\"Some API Error\"", 651 EXPECT_EQ("\"Some API Error\"",
652 GetStringPropertyFromObject(context->Global(), context, 652 GetStringPropertyFromObject(context->Global(), context,
653 "lastErrorMessage")); 653 "lastErrorMessage"));
654 } 654 }
655 655
656 } // namespace extensions 656 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/image_loader.cc ('k') | gin/v8_platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698