// Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/tools/test_shell/test_shell_test.h"

using WebKit::WebView;

class WebViewTest : public TestShellTest {
};

TEST_F(WebViewTest, ActiveState) {
  WebView* view = test_shell_->webView();
  ASSERT_TRUE(view != 0);

  view->setIsActive(true);
  EXPECT_TRUE(view->isActive());

  view->setIsActive(false);
  EXPECT_FALSE(view->isActive());

  view->setIsActive(true);
  EXPECT_TRUE(view->isActive());
}

// TODO(viettrungluu): add more tests

// Copyright (c) 2006-2008 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 "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/tools/test_shell/test_shell_test.h"

using WebKit::WebView;

class WebViewTest : public TestShellTest {
};

TEST_F(WebViewTest, GetContentAsPlainText) {
  WebView* view = test_shell_->webView();
  ASSERT_TRUE(view != 0);

  view->setIsActive(true);
  EXPECT_TRUE(view->isActive());

  view->setIsActive(false);
  EXPECT_FALSE(view->isActive());

  view->setIsActive(true);
  EXPECT_TRUE(view->isActive());
}

// TODO(viettrungluu): add more tests

--- 
+++ 
@@ -11,7 +11,7 @@
 class WebViewTest : public TestShellTest {
 };
 
-TEST_F(WebViewTest, GetContentAsPlainText) {
+TEST_F(WebViewTest, ActiveState) {
   WebView* view = test_shell_->webView();
   ASSERT_TRUE(view != 0);
 
Rename unit test: WebViewTest.GetContentAsPlainText -> WebViewTest.ActiveState.

I'm responsible for misnaming it in the first place (cut-and-paste error). Oops.

BUG=23501
TEST=none

Review URL: http://codereview.chromium.org/414034

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@32612 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
