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

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

Issue 2947463002: [Extensions Bindings] Add a bindings/ subdirectory under renderer (Closed)
Patch Set: . Created 3 years, 5 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_invocation_errors.h" 5 #include "extensions/renderer/bindings/api_invocation_errors.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace extensions { 9 namespace extensions {
10 namespace api_errors { 10 namespace api_errors {
11 11
12 // Tests chaining errors for more complicated errors. More of a set of example 12 // Tests chaining errors for more complicated errors. More of a set of example
13 // strings than a test of the logic itself (which is pretty simple). 13 // strings than a test of the logic itself (which is pretty simple).
14 TEST(APIInvocationErrors, ChainedErrors) { 14 TEST(APIInvocationErrors, ChainedErrors) {
15 EXPECT_EQ("Error at index 0: Invalid type: expected string, found integer.", 15 EXPECT_EQ("Error at index 0: Invalid type: expected string, found integer.",
(...skipping 19 matching lines...) Expand all
35 EXPECT_EQ( 35 EXPECT_EQ(
36 "Error in invocation of tabs.query(" 36 "Error in invocation of tabs.query("
37 "object details, function callback): " 37 "object details, function callback): "
38 "Error at parameter 'details': Unexpected property: 'foo'.", 38 "Error at parameter 'details': Unexpected property: 'foo'.",
39 InvocationError("tabs.query", "object details, function callback", 39 InvocationError("tabs.query", "object details, function callback",
40 ArgumentError("details", UnexpectedProperty("foo")))); 40 ArgumentError("details", UnexpectedProperty("foo"))));
41 } 41 }
42 42
43 } // namespace api_errors 43 } // namespace api_errors
44 } // namespace extensions 44 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/bindings/api_invocation_errors.cc ('k') | extensions/renderer/bindings/api_last_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698