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

Side by Side Diff: extensions/renderer/bindings/api_last_error_unittest.cc

Issue 2947463002: [Extensions Bindings] Add a bindings/ subdirectory under renderer (Closed)
Patch Set: . Created 3 years, 6 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/api_last_error.h" 5 #include "extensions/renderer/bindings/api_last_error.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/optional.h" 9 #include "base/optional.h"
10 #include "extensions/renderer/api_binding_test.h" 10 #include "extensions/renderer/bindings/api_binding_test.h"
11 #include "extensions/renderer/api_binding_test_util.h" 11 #include "extensions/renderer/bindings/api_binding_test_util.h"
12 #include "gin/converter.h" 12 #include "gin/converter.h"
13 #include "gin/public/context_holder.h" 13 #include "gin/public/context_holder.h"
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 namespace { 17 namespace {
18 18
19 void DoNothingWithError(v8::Local<v8::Context> context, 19 void DoNothingWithError(v8::Local<v8::Context> context,
20 const std::string& error) {} 20 const std::string& error) {}
21 21
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 last_error.ClearError(context_b, false); 216 last_error.ClearError(context_b, false);
217 EXPECT_EQ("\"Last error a\"", GetLastErrorMessage(parent_a, context_a)); 217 EXPECT_EQ("\"Last error a\"", GetLastErrorMessage(parent_a, context_a));
218 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b)); 218 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b));
219 219
220 last_error.ClearError(context_a, false); 220 last_error.ClearError(context_a, false);
221 EXPECT_EQ("undefined", GetLastErrorMessage(parent_a, context_a)); 221 EXPECT_EQ("undefined", GetLastErrorMessage(parent_a, context_a));
222 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b)); 222 EXPECT_EQ("undefined", GetLastErrorMessage(parent_b, context_b));
223 } 223 }
224 224
225 } // namespace extensions 225 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/bindings/api_last_error.cc ('k') | extensions/renderer/bindings/api_request_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698