<commit_before>// Copyright (c) 2009 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 "chrome/app/chrome_dll_resource.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/automated_ui_tests/automated_ui_test_base.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"

#if defined(OS_MACOSX)
// http://crbug.com/45882
#define MAYBE_FindInPage FAILS_FindInPage
#else  // !defined(OS_MACOSX)
#define MAYBE_FindInPage FindInPage
#endif

TEST_F(AutomatedUITestBase, MAYBE_FindInPage) {
  ASSERT_TRUE(FindInPage());
  bool is_visible;
  ASSERT_TRUE(active_browser()->IsFindWindowFullyVisible(&is_visible));
  EXPECT_TRUE(is_visible);
}

TEST_F(AutomatedUITestBase, Home) {
  FilePath path_prefix(test_data_directory_.AppendASCII("session_history"));
  GURL bot1(net::FilePathToFileURL(path_prefix.AppendASCII("bot1.html")));
  NavigateToURL(bot1);  // To help verify that Home does something.

  ASSERT_TRUE(Home());

  GURL url;
  ASSERT_TRUE(active_browser()->GetActiveTab()->GetCurrentURL(&url));
  EXPECT_EQ(GURL(chrome::kAboutBlankURL), url);

  std::wstring title;
  ASSERT_TRUE(active_browser()->GetActiveTab()->GetTabTitle(&title));
  EXPECT_EQ(L"", title);
}

TEST_F(AutomatedUITestBase, OpenNewTab) {<commit_msg>[Mac] AutomatedUITestBase.FindInPage should not be marked FAILS on Mac.<commit_after>// Copyright (c) 2009 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 "chrome/app/chrome_dll_resource.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/automated_ui_tests/automated_ui_test_base.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"

TEST_F(AutomatedUITestBase, FindInPage) {
  ASSERT_TRUE(FindInPage());
  bool is_visible;
  ASSERT_TRUE(active_browser()->IsFindWindowFullyVisible(&is_visible));
  EXPECT_TRUE(is_visible);
}

TEST_F(AutomatedUITestBase, Home) {
  FilePath path_prefix(test_data_directory_.AppendASCII("session_history"));
  GURL bot1(net::FilePathToFileURL(path_prefix.AppendASCII("bot1.html")));
  NavigateToURL(bot1);  // To help verify that Home does something.

  ASSERT_TRUE(Home());

  GURL url;
  ASSERT_TRUE(active_browser()->GetActiveTab()->GetCurrentURL(&url));
  EXPECT_EQ(GURL(chrome::kAboutBlankURL), url);

  std::wstring title;
  ASSERT_TRUE(active_browser()->GetActiveTab()->GetTabTitle(&title));
  EXPECT_EQ(L"", title);
}

TEST_F(AutomatedUITestBase, OpenNewTab) {
{'fraction_non_alphanumeric': 0.13302913302913302, 'fraction_numerical': 0.006669006669006669, 'mean_word_length': 6.559681697612732, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4437945', 'n_tokens_mistral': 1015, 'n_tokens_neox': 988, 'n_words': 178}