<commit_before>// 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 "base/command_line.h"
#include "base/file_util.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/view_ids.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "gfx/rect.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "views/event.h"

#if defined(OS_CHROMEOS)
// Disabled, see http://crbug.com/40043.
#define MAYBE_Tab2OutOfTabStrip DISABLED_Tab2OutOfTabStrip
#else
#define MAYBE_Tab2OutOfTabStrip Tab2OutOfTabStrip
#endif

#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
// Disabled on Toolkit views bot. See http://crbug.com/42614
#define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape
#else
// Flaky, see http://crbug.com/21092.
#define MAYBE_Tab1Tab3Escape FLAKY_Tab1Tab3Escape
#endif


class TabDraggingTest : public UITest {
protected:
  TabDraggingTest() {
    show_window_ = true;
  }
};

// Automated UI test to open three tabs in a new window, and drag Tab_1 into
// the position of Tab_2.
// Disabled as per http://crbug.com/10941
TEST_F(TabDraggingTest, DISABLED_Tab1Tab2) {
  scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
  ASSERT_TRUE(browser.get());
  scoped_refptr<WindowProxy> window(browser->GetWindow());
  ASSERT_TRUE(window.get());

  // Get initial tab count.
  int initial_tab_count = 0;
  ASSERT_TRUE(browser->GetTabCount(&initial_tab_count));
  ASSERT_TRUE(1 == initial_tab_count);

  // Get Tab_1 which comes with the browser window.
  scoped_refptr<TabProxy> tab1(browser->GetTab(0));
  ASSERT_TRUE(tab1.get());<commit_msg>Views: Disable a failing test on the Linux CrOS bot. Fix my mistake in r45662.<commit_after>// Copyright (c) 2010 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 "base/command_line.h"
#include "base/file_util.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/view_ids.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "gfx/rect.h"
#include "googleurl/src/gurl.h"
#include "net/base/net_util.h"
#include "views/event.h"

#if defined(OS_CHROMEOS)
// Disabled, see http://crbug.com/40043.
#define MAYBE_Tab2OutOfTabStrip DISABLED_Tab2OutOfTabStrip
#else
#define MAYBE_Tab2OutOfTabStrip Tab2OutOfTabStrip
#endif

#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
// Disabled on Toolkit views bot. See http://crbug.com/42614
#define MAYBE_Tab1Tab3Escape DISABLED_Tab1Tab3Escape
#else
// Flaky, see http://crbug.com/21092.
#define MAYBE_Tab1Tab3Escape FLAKY_Tab1Tab3Escape
#endif


class TabDraggingTest : public UITest {
 protected:
  TabDraggingTest() {
    show_window_ = true;
  }
};

// Automated UI test to open three tabs in a new window, and drag Tab_1 into
// the position of Tab_2.
// Disabled as per http://crbug.com/10941
TEST_F(TabDraggingTest, DISABLED_Tab1Tab2) {
  scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
  ASSERT_TRUE(browser.get());
  scoped_refptr<WindowProxy> window(browser->GetWindow());
  ASSERT_TRUE(window.get());

  // Get initial tab count.
  int initial_tab_count = 0;
  ASSERT_TRUE(browser->GetTabCount(&initial_tab_count));
  ASSERT_TRUE(1 == initial_tab_count);

  // Get Tab_1 which comes with the browser window.
  scoped_refptr<TabProxy> tab1(browser->GetTab(0));
  ASSERT_TRUE(tab1.get());
{'fraction_non_alphanumeric': 0.12320987654320988, 'fraction_numerical': 0.0254320987654321, 'mean_word_length': 5.3198127925117005, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, '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': '5387118', 'n_tokens_mistral': 1510, 'n_tokens_neox': 1453, 'n_words': 320}