OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "webkit/api/public/WebView.h" | 6 #include "third_party/WebKit/WebKit/chromium/public/WebView.h" |
7 #include "webkit/tools/test_shell/test_shell_test.h" | 7 #include "webkit/tools/test_shell/test_shell_test.h" |
8 | 8 |
9 using WebKit::WebView; | 9 using WebKit::WebView; |
10 | 10 |
11 class WebViewTest : public TestShellTest { | 11 class WebViewTest : public TestShellTest { |
12 }; | 12 }; |
13 | 13 |
14 TEST_F(WebViewTest, GetContentAsPlainText) { | 14 TEST_F(WebViewTest, GetContentAsPlainText) { |
15 WebView* view = test_shell_->webView(); | 15 WebView* view = test_shell_->webView(); |
16 ASSERT_TRUE(view != 0); | 16 ASSERT_TRUE(view != 0); |
17 | 17 |
18 view->setIsActive(true); | 18 view->setIsActive(true); |
19 EXPECT_TRUE(view->isActive()); | 19 EXPECT_TRUE(view->isActive()); |
20 | 20 |
21 view->setIsActive(false); | 21 view->setIsActive(false); |
22 EXPECT_FALSE(view->isActive()); | 22 EXPECT_FALSE(view->isActive()); |
23 | 23 |
24 view->setIsActive(true); | 24 view->setIsActive(true); |
25 EXPECT_TRUE(view->isActive()); | 25 EXPECT_TRUE(view->isActive()); |
26 } | 26 } |
27 | 27 |
28 // TODO(viettrungluu): add more tests | 28 // TODO(viettrungluu): add more tests |
OLD | NEW |