OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 <stddef.h> |
5 #import <UIKit/UIKit.h> | 6 #import <UIKit/UIKit.h> |
6 | 7 |
7 #include <vector> | 8 #include <vector> |
8 | 9 |
| 10 #include "base/macros.h" |
9 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
10 #include "ios/web/public/test/web_test_util.h" | 12 #include "ios/web/public/test/web_test_util.h" |
11 #import "ios/web/test/web_test.h" | 13 #import "ios/web/test/web_test.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
13 #include "testing/gtest_mac.h" | 15 #include "testing/gtest_mac.h" |
14 | 16 |
15 // Unit tests for ios/web/web_state/js/resources/core.js. | 17 // Unit tests for ios/web/web_state/js/resources/core.js. |
16 | 18 |
17 namespace { | 19 namespace { |
18 | 20 |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 this->LoadHtml(base::StringPrintf(image, javascript.c_str())); | 280 this->LoadHtml(base::StringPrintf(image, javascript.c_str())); |
279 result = this->RunJavaScript(@"__gCrWeb['getElementFromPoint'](200, 200)"); | 281 result = this->RunJavaScript(@"__gCrWeb['getElementFromPoint'](200, 200)"); |
280 expected_result = R"({"src":"foo","referrerPolicy":"default"})"; | 282 expected_result = R"({"src":"foo","referrerPolicy":"default"})"; |
281 | 283 |
282 // Make sure the returned JSON does not have an 'href' key. | 284 // Make sure the returned JSON does not have an 'href' key. |
283 EXPECT_EQ(expected_result, [result UTF8String]); | 285 EXPECT_EQ(expected_result, [result UTF8String]); |
284 } | 286 } |
285 } | 287 } |
286 | 288 |
287 } // namespace | 289 } // namespace |
OLD | NEW |