OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <WebKit/WebKit.h> | 5 #import <WebKit/WebKit.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
11 #import "base/mac/scoped_nsobject.h" | 11 #import "base/mac/scoped_nsobject.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #import "base/test/ios/wait_util.h" | 13 #import "base/test/ios/wait_util.h" |
14 #include "base/test/test_timeouts.h" | 14 #include "base/test/test_timeouts.h" |
15 #include "ios/web/public/browser_state.h" | 15 #include "ios/web/public/browser_state.h" |
16 #import "ios/web/public/test/http_server.h" | 16 #import "ios/web/public/test/http_server/http_server.h" |
| 17 #import "ios/web/public/test/http_server/string_response_provider.h" |
17 #import "ios/web/public/test/js_test_util.h" | 18 #import "ios/web/public/test/js_test_util.h" |
18 #import "ios/web/public/test/response_providers/string_response_provider.h" | |
19 #import "ios/web/public/web_view_creation_util.h" | 19 #import "ios/web/public/web_view_creation_util.h" |
20 #import "ios/web/test/web_int_test.h" | 20 #import "ios/web/test/web_int_test.h" |
21 #import "net/base/mac/url_conversions.h" | 21 #import "net/base/mac/url_conversions.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 #import "testing/gtest_mac.h" | 23 #import "testing/gtest_mac.h" |
24 | 24 |
25 // A WKNavigationDelegate that is used to check if a WKWebView has finished | 25 // A WKNavigationDelegate that is used to check if a WKWebView has finished |
26 // a navigation. Used for testing purposes. | 26 // a navigation. Used for testing purposes. |
27 @interface TestNavigationDelegate : NSObject <WKNavigationDelegate> | 27 @interface TestNavigationDelegate : NSObject <WKNavigationDelegate> |
28 // YES if a navigation has finished. | 28 // YES if a navigation has finished. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 SetLocalStorageItem(@"someKey2", @"someValue2", web_view_2); | 174 SetLocalStorageItem(@"someKey2", @"someValue2", web_view_2); |
175 // Due to platform limitation, it's not possible to actually set localStorage | 175 // Due to platform limitation, it's not possible to actually set localStorage |
176 // item on an OTR BrowserState. Therefore, it's not possible to verify that a | 176 // item on an OTR BrowserState. Therefore, it's not possible to verify that a |
177 // localStorage item has been correctly set. | 177 // localStorage item has been correctly set. |
178 // Look at | 178 // Look at |
179 // http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-s
afari-quota-exceeded-err-dom-exception-22-an | 179 // http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-s
afari-quota-exceeded-err-dom-exception-22-an |
180 // for more details. | 180 // for more details. |
181 // Test that LocalStorage has not leaked over to |web_view_1|. | 181 // Test that LocalStorage has not leaked over to |web_view_1|. |
182 EXPECT_NSEQ([NSNull null], GetLocalStorageItem(@"someKey2", web_view_1)); | 182 EXPECT_NSEQ([NSNull null], GetLocalStorageItem(@"someKey2", web_view_1)); |
183 } | 183 } |
OLD | NEW |