OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #import "ios/web/web_state/ui/web_view_js_utils.h" | 5 #import "ios/web/web_state/ui/web_view_js_utils.h" |
6 | 6 |
7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/mac/bind_objc_block.h" | 9 #import "base/mac/bind_objc_block.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace web { | 13 namespace web { |
14 | 14 |
15 // Tests that ValueResultFromWKResult converts nil value to nullptr. | 15 // Tests that ValueResultFromWKResult converts nil value to nullptr. |
16 TEST(WebViewJsUtilsTest, ValueResultFromUndefinedWKResult) { | 16 TEST(WebViewJsUtilsTest, ValueResultFromUndefinedWKResult) { |
17 EXPECT_FALSE(ValueResultFromWKResult(nil)); | 17 EXPECT_FALSE(ValueResultFromWKResult(nil)); |
18 } | 18 } |
19 | 19 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 current_depth++) { | 183 current_depth++) { |
184 EXPECT_NE(nullptr, current_list); | 184 EXPECT_NE(nullptr, current_list); |
185 inner_list = nullptr; | 185 inner_list = nullptr; |
186 current_list->GetList(0, &inner_list); | 186 current_list->GetList(0, &inner_list); |
187 current_list = inner_list; | 187 current_list = inner_list; |
188 } | 188 } |
189 EXPECT_EQ(nullptr, current_list); | 189 EXPECT_EQ(nullptr, current_list); |
190 } | 190 } |
191 | 191 |
192 } // namespace web | 192 } // namespace web |
OLD | NEW |