OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1375 loop.RunFor(TestTimeouts::action_max_timeout_ms()); | 1375 loop.RunFor(TestTimeouts::action_max_timeout_ms()); |
1376 | 1376 |
1377 EXPECT_CALL(*mock_, HandleClosed(1)); | 1377 EXPECT_CALL(*mock_, HandleClosed(1)); |
1378 ::DestroyWindow(foo_host); | 1378 ::DestroyWindow(foo_host); |
1379 mock_->DestroyHostWindow(); | 1379 mock_->DestroyHostWindow(); |
1380 } | 1380 } |
1381 | 1381 |
1382 #endif // defined(OS_WIN) | 1382 #endif // defined(OS_WIN) |
1383 | 1383 |
1384 // TODO(port): Need to port autocomplete_edit_proxy.* first. | 1384 // TODO(port): Need to port autocomplete_edit_proxy.* first. |
1385 #if defined(OS_WIN) || defined(OS_LINUX) | 1385 #if !defined(OS_MACOSX) |
1386 TEST_F(AutomationProxyTest, AutocompleteGetSetText) { | 1386 TEST_F(AutomationProxyTest, AutocompleteGetSetText) { |
1387 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 1387 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
1388 ASSERT_TRUE(browser.get()); | 1388 ASSERT_TRUE(browser.get()); |
1389 scoped_refptr<AutocompleteEditProxy> edit( | 1389 scoped_refptr<AutocompleteEditProxy> edit( |
1390 browser->GetAutocompleteEdit()); | 1390 browser->GetAutocompleteEdit()); |
1391 ASSERT_TRUE(edit.get()); | 1391 ASSERT_TRUE(edit.get()); |
1392 EXPECT_TRUE(edit->is_valid()); | 1392 EXPECT_TRUE(edit->is_valid()); |
1393 const string16 text_to_set = ASCIIToUTF16("Lollerskates"); | 1393 const string16 text_to_set = ASCIIToUTF16("Lollerskates"); |
1394 string16 actual_text; | 1394 string16 actual_text; |
1395 EXPECT_TRUE(edit->SetText(text_to_set)); | 1395 EXPECT_TRUE(edit->SetText(text_to_set)); |
(...skipping 23 matching lines...) Expand all Loading... |
1419 const string16 text_to_set2 = ASCIIToUTF16("Roflcopter"); | 1419 const string16 text_to_set2 = ASCIIToUTF16("Roflcopter"); |
1420 string16 actual_text1, actual_text2; | 1420 string16 actual_text1, actual_text2; |
1421 EXPECT_TRUE(edit1->SetText(text_to_set1)); | 1421 EXPECT_TRUE(edit1->SetText(text_to_set1)); |
1422 EXPECT_TRUE(edit2->SetText(text_to_set2)); | 1422 EXPECT_TRUE(edit2->SetText(text_to_set2)); |
1423 EXPECT_TRUE(edit1->GetText(&actual_text1)); | 1423 EXPECT_TRUE(edit1->GetText(&actual_text1)); |
1424 EXPECT_TRUE(edit2->GetText(&actual_text2)); | 1424 EXPECT_TRUE(edit2->GetText(&actual_text2)); |
1425 EXPECT_EQ(text_to_set1, actual_text1); | 1425 EXPECT_EQ(text_to_set1, actual_text1); |
1426 EXPECT_EQ(text_to_set2, actual_text2); | 1426 EXPECT_EQ(text_to_set2, actual_text2); |
1427 } | 1427 } |
1428 | 1428 |
1429 #endif // defined(OS_WIN) || defined(OS_LINUX) | 1429 #endif // !defined(OS_MACOSX) |
1430 | 1430 |
1431 #if defined(OS_MACOSX) | 1431 #if defined(OS_MACOSX) |
1432 // Disabled, http://crbug.com/48601. | 1432 // Disabled, http://crbug.com/48601. |
1433 #define AutocompleteMatchesTest DISABLED_AutocompleteMatchesTest | 1433 #define AutocompleteMatchesTest DISABLED_AutocompleteMatchesTest |
1434 #else | 1434 #else |
1435 // Flaky, http://crbug.com/19876. | 1435 // Flaky, http://crbug.com/19876. |
1436 #define AutocompleteMatchesTest FLAKY_AutocompleteMatchesTest | 1436 #define AutocompleteMatchesTest FLAKY_AutocompleteMatchesTest |
1437 #endif | 1437 #endif |
1438 TEST_F(AutomationProxyVisibleTest, AutocompleteMatchesTest) { | 1438 TEST_F(AutomationProxyVisibleTest, AutocompleteMatchesTest) { |
1439 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); | 1439 scoped_refptr<BrowserProxy> browser(automation()->GetBrowserWindow(0)); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1725 int diff_pixels_count = 0; | 1725 int diff_pixels_count = 0; |
1726 for (int x = 0; x < img_size.width(); ++x) { | 1726 for (int x = 0; x < img_size.width(); ++x) { |
1727 for (int y = 0; y < img_size.height(); ++y) { | 1727 for (int y = 0; y < img_size.height(); ++y) { |
1728 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { | 1728 if (*snapshot_bmp.getAddr32(x, y) != *reference_bmp.getAddr32(x, y)) { |
1729 ++diff_pixels_count; | 1729 ++diff_pixels_count; |
1730 } | 1730 } |
1731 } | 1731 } |
1732 } | 1732 } |
1733 ASSERT_EQ(diff_pixels_count, 0); | 1733 ASSERT_EQ(diff_pixels_count, 0); |
1734 } | 1734 } |
OLD | NEW |