summaryrefslogtreecommitdiffstats
path: root/ios/web/net/crw_url_verifying_protocol_handler_unittest.mm
blob: d3bc8353a64166bf4444fb8f67d1b83129524eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ios/web/net/crw_url_verifying_protocol_handler.h"

#include "base/memory/scoped_ptr.h"
#import "ios/web/public/test/test_web_client.h"
#include "ios/web/public/web_client.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace {

// TODO(shreyasv): See if this can use the WebTest test fixture.
TEST(CRWURLVerifyingProtocolHandlerTest, NonLazyInitializer) {
  scoped_ptr<web::TestWebClient> test_web_client(new web::TestWebClient());
  web::SetWebClient(test_web_client.get());
  EXPECT_TRUE([CRWURLVerifyingProtocolHandler preInitialize]);
  web::SetWebClient(nullptr);
}

}  // namespace