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

Side by Side Diff: ios/web/web_state/js/crw_js_post_request_loader_unittest.mm

Issue 1780943003: [ios] Disabled LoadsCorrectHTML on device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ios/web/web_state/js/crw_js_post_request_loader.h" 5 #import "ios/web/web_state/js/crw_js_post_request_loader.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #import "base/mac/foundation_util.h" 9 #import "base/mac/foundation_util.h"
10 #import "base/mac/scoped_nsobject.h" 10 #import "base/mac/scoped_nsobject.h"
(...skipping 20 matching lines...) Expand all
31 " base64data = reader.result;" 31 " base64data = reader.result;"
32 " window.webkit.messageHandlers.XHRSendHandler.postMessage(base64data);" 32 " window.webkit.messageHandlers.XHRSendHandler.postMessage(base64data);"
33 " };" 33 " };"
34 "};"; 34 "};";
35 35
36 // Tests that the POST request is correctly executed through XMLHttpRequest. 36 // Tests that the POST request is correctly executed through XMLHttpRequest.
37 // TODO(crbug.com/592034): This test is flaky on device. 37 // TODO(crbug.com/592034): This test is flaky on device.
38 #if TARGET_IPHONE_SIMULATOR 38 #if TARGET_IPHONE_SIMULATOR
39 #define MAYBE_LoadsCorrectHTML LoadsCorrectHTML 39 #define MAYBE_LoadsCorrectHTML LoadsCorrectHTML
40 #else 40 #else
41 #define MAYBE_LoadsCorrectHTML FLAKY_LoadsCorrectHTML 41 #define MAYBE_LoadsCorrectHTML DISABLED_LoadsCorrectHTML
42 #endif 42 #endif
43 TEST_F(CRWJSPOSTRequestLoaderTest, MAYBE_LoadsCorrectHTML) { 43 TEST_F(CRWJSPOSTRequestLoaderTest, MAYBE_LoadsCorrectHTML) {
44 // Set up necessary objects. 44 // Set up necessary objects.
45 scoped_nsobject<CRWJSPOSTRequestLoader> loader( 45 scoped_nsobject<CRWJSPOSTRequestLoader> loader(
46 [[CRWJSPOSTRequestLoader alloc] init]); 46 [[CRWJSPOSTRequestLoader alloc] init]);
47 scoped_nsobject<WKWebView> web_view( 47 scoped_nsobject<WKWebView> web_view(
48 web::CreateWKWebView(CGRectZero, GetBrowserState())); 48 web::CreateWKWebView(CGRectZero, GetBrowserState()));
49 WKUserContentController* contentController = 49 WKUserContentController* contentController =
50 web_view.get().configuration.userContentController; 50 web_view.get().configuration.userContentController;
51 scoped_nsobject<CRWWKScriptMessageRouter> messageRouter( 51 scoped_nsobject<CRWWKScriptMessageRouter> messageRouter(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 return complete; 99 return complete;
100 }); 100 });
101 101
102 // Clean up installed script handler. 102 // Clean up installed script handler.
103 [messageRouter removeScriptMessageHandlerForName:@"XHRSendHandler" 103 [messageRouter removeScriptMessageHandlerForName:@"XHRSendHandler"
104 webView:web_view]; 104 webView:web_view];
105 } 105 }
106 106
107 } // namespace 107 } // namespace
108 } // namespace base 108 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698