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

Side by Side Diff: ios/web/web_state/web_state_impl_unittest.mm

Issue 2720613005: Refactor serialisation of openerId & openerNavigationIndex. (Closed)
Patch Set: Fix CRWSessionController's initializer comment. Created 3 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 | « ios/web/web_state/web_state_impl.mm ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/web_state_impl.h" 5 #import "ios/web/web_state/web_state_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 class WebStateTest : public web::WebTest { 240 class WebStateTest : public web::WebTest {
241 protected: 241 protected:
242 void SetUp() override { 242 void SetUp() override {
243 web_state_.reset(new WebStateImpl(&browser_state_)); 243 web_state_.reset(new WebStateImpl(&browser_state_));
244 } 244 }
245 245
246 // Loads specified html page into WebState. 246 // Loads specified html page into WebState.
247 void LoadHtml(std::string html) { 247 void LoadHtml(std::string html) {
248 web_state_->GetNavigationManagerImpl().InitializeSession(nil, nil, NO, 0); 248 web_state_->GetNavigationManagerImpl().InitializeSession(nil, NO);
249 249
250 // Use data: url for loading html page. 250 // Use data: url for loading html page.
251 std::string encoded_html; 251 std::string encoded_html;
252 base::Base64Encode(html, &encoded_html); 252 base::Base64Encode(html, &encoded_html);
253 GURL url("data:text/html;charset=utf8;base64," + encoded_html); 253 GURL url("data:text/html;charset=utf8;base64," + encoded_html);
254 web::NavigationManager::WebLoadParams params(url); 254 web::NavigationManager::WebLoadParams params(url);
255 web_state_->GetNavigationManager()->LoadURLWithParams(params); 255 web_state_->GetNavigationManager()->LoadURLWithParams(params);
256 256
257 // Trigger the load. 257 // Trigger the load.
258 web_state_->SetWebUsageEnabled(true); 258 web_state_->SetWebUsageEnabled(true);
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 "</script>"); 674 "</script>");
675 675
676 base::test::ios::WaitUntilCondition(^{ 676 base::test::ios::WaitUntilCondition(^{
677 return message_received; 677 return message_received;
678 }); 678 });
679 web_state_->RemoveScriptCommandCallback("test"); 679 web_state_->RemoveScriptCommandCallback("test");
680 } 680 }
681 681
682 } // namespace 682 } // namespace
683 } // namespace web 683 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | ios/web/webui/web_ui_mojo_inttest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698