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
3 // found in the LICENSE file.
5 #include "ios/web/net/crw_url_verifying_protocol_handler.h"
7 #include "base/memory/scoped_ptr.h"
8 #import "ios/web/public/test/test_web_client.h"
9 #include "ios/web/public/web_client.h"
10 #include "testing/gtest/include/gtest/gtest.h"
14 // TODO(shreyasv): See if this can use the WebTest test fixture.
15 TEST(CRWURLVerifyingProtocolHandlerTest, NonLazyInitializer) {
16 scoped_ptr<web::TestWebClient> test_web_client(new web::TestWebClient());
17 web::SetWebClient(test_web_client.get());
18 EXPECT_TRUE([CRWURLVerifyingProtocolHandler preInitialize]);
19 web::SetWebClient(nullptr);