Home | History | Annotate | Download | only in glue
      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
      3 // found in the LICENSE file.
      4 
      5 #include "testing/gtest/include/gtest/gtest.h"
      6 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
      7 #include "webkit/tools/test_shell/test_shell_test.h"
      8 
      9 using WebKit::WebView;
     10 
     11 class WebViewTest : public TestShellTest {
     12 };
     13 
     14 TEST_F(WebViewTest, ActiveState) {
     15   WebView* view = test_shell_->webView();
     16   ASSERT_TRUE(view != 0);
     17 
     18   view->setIsActive(true);
     19   EXPECT_TRUE(view->isActive());
     20 
     21   view->setIsActive(false);
     22   EXPECT_FALSE(view->isActive());
     23 
     24   view->setIsActive(true);
     25   EXPECT_TRUE(view->isActive());
     26 }
     27 
     28 // TODO(viettrungluu): add more tests
     29