OLD | NEW |
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/public/web_state/crw_web_controller_observer.h" | 5 #import "ios/web/public/web_state/crw_web_controller_observer.h" |
6 | 6 |
7 #include "base/mac/scoped_nsobject.h" | 7 #import "base/mac/scoped_nsobject.h" |
8 #import "ios/web/test/crw_fake_web_controller_observer.h" | 8 #import "ios/web/test/crw_fake_web_controller_observer.h" |
9 #import "ios/web/test/web_test_with_web_controller.h" | 9 #import "ios/web/test/web_test_with_web_controller.h" |
10 | 10 |
11 namespace web { | 11 namespace web { |
12 | 12 |
13 // Test fixture to test web controller observing. | 13 // Test fixture to test web controller observing. |
14 class CRWWebControllerObserverTest : public web::WebTestWithWebController { | 14 class CRWWebControllerObserverTest : public web::WebTestWithWebController { |
15 protected: | 15 protected: |
16 void SetUp() override { | 16 void SetUp() override { |
17 web::WebTestWithWebController::SetUp(); | 17 web::WebTestWithWebController::SetUp(); |
(...skipping 12 matching lines...) Expand all Loading... |
30 fake_web_controller_observer_; | 30 fake_web_controller_observer_; |
31 }; | 31 }; |
32 | 32 |
33 TEST_F(CRWWebControllerObserverTest, PageLoaded) { | 33 TEST_F(CRWWebControllerObserverTest, PageLoaded) { |
34 EXPECT_FALSE([fake_web_controller_observer_ pageLoaded]); | 34 EXPECT_FALSE([fake_web_controller_observer_ pageLoaded]); |
35 LoadHtml(@"<p></p>"); | 35 LoadHtml(@"<p></p>"); |
36 EXPECT_TRUE([fake_web_controller_observer_ pageLoaded]); | 36 EXPECT_TRUE([fake_web_controller_observer_ pageLoaded]); |
37 } | 37 } |
38 | 38 |
39 } // namespace web | 39 } // namespace web |
OLD | NEW |