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

Side by Side Diff: ios/web/test/web_test.mm

Issue 1972903003: [ios] Register test web schemes in WebTestSuite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added comments to |web_client_|. Created 4 years, 7 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/ios_web.gyp ('k') | ios/web/test/web_test_suite.h » ('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 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 #import "ios/web/test/web_test.h" 5 #import "ios/web/test/web_test.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 20 matching lines...) Expand all
31 mainDocumentURL:(const GURL&)mainDocumentURL 31 mainDocumentURL:(const GURL&)mainDocumentURL
32 linkClicked:(BOOL)linkClicked { 32 linkClicked:(BOOL)linkClicked {
33 return YES; 33 return YES;
34 } 34 }
35 @end 35 @end
36 36
37 namespace web { 37 namespace web {
38 38
39 #pragma mark - 39 #pragma mark -
40 40
41 WebTest::WebTest() : web_client_(base::WrapUnique(new TestWebClient)) { 41 WebTest::WebTest() : web_client_(base::WrapUnique(new TestWebClient)) {}
42 static dispatch_once_t onceToken;
43 dispatch_once(&onceToken, ^{
44 RegisterWebSchemes(false);
45 });
46 }
47 42
48 WebTest::~WebTest() {} 43 WebTest::~WebTest() {}
49 44
50 void WebTest::SetUp() { 45 void WebTest::SetUp() {
51 PlatformTest::SetUp(); 46 PlatformTest::SetUp();
52 BrowserState::GetActiveStateManager(&browser_state_)->SetActive(true); 47 BrowserState::GetActiveStateManager(&browser_state_)->SetActive(true);
53 } 48 }
54 49
55 void WebTest::TearDown() { 50 void WebTest::TearDown() {
56 BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false); 51 BrowserState::GetActiveStateManager(&browser_state_)->SetActive(false);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 213 }
219 return false; 214 return false;
220 } 215 }
221 216
222 NSString* WebTestWithWebController::CreateLoadCheck() { 217 NSString* WebTestWithWebController::CreateLoadCheck() {
223 return [NSString stringWithFormat:@"<p style=\"display: none;\">%d</p>", 218 return [NSString stringWithFormat:@"<p style=\"display: none;\">%d</p>",
224 s_html_load_count++]; 219 s_html_load_count++];
225 } 220 }
226 221
227 } // namespace web 222 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/test/web_test_suite.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698