OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 #define MAYBE_AcceleratorExtensions DISABLED_AcceleratorExtensions | 519 #define MAYBE_AcceleratorExtensions DISABLED_AcceleratorExtensions |
520 #else | 520 #else |
521 #define MAYBE_AcceleratorExtensions AcceleratorExtensions | 521 #define MAYBE_AcceleratorExtensions AcceleratorExtensions |
522 #endif | 522 #endif |
523 TEST_F(AutomationProxyTest, MAYBE_AcceleratorExtensions) { | 523 TEST_F(AutomationProxyTest, MAYBE_AcceleratorExtensions) { |
524 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 524 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
525 ASSERT_TRUE(window.get()); | 525 ASSERT_TRUE(window.get()); |
526 | 526 |
527 ASSERT_TRUE(window->RunCommand(IDC_MANAGE_EXTENSIONS)); | 527 ASSERT_TRUE(window->RunCommand(IDC_MANAGE_EXTENSIONS)); |
528 | 528 |
529 EXPECT_EQ("chrome://settings/extensions", GetActiveTabURL().spec()); | 529 EXPECT_EQ("chrome://chrome/extensions", GetActiveTabURL().spec()); |
530 } | 530 } |
531 | 531 |
532 TEST_F(AutomationProxyTest, AcceleratorHistory) { | 532 TEST_F(AutomationProxyTest, AcceleratorHistory) { |
533 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); | 533 scoped_refptr<BrowserProxy> window(automation()->GetBrowserWindow(0)); |
534 ASSERT_TRUE(window.get()); | 534 ASSERT_TRUE(window.get()); |
535 | 535 |
536 ASSERT_TRUE(window->RunCommand(IDC_SHOW_HISTORY)); | 536 ASSERT_TRUE(window->RunCommand(IDC_SHOW_HISTORY)); |
537 | 537 |
538 // We expect the RunCommand above to wait until the title is updated. | 538 EXPECT_EQ("chrome://chrome/history", GetActiveTabURL().spec()); |
539 EXPECT_EQ(L"History", GetActiveTabTitle()); | |
540 } | 539 } |
541 | 540 |
542 class AutomationProxyTest4 : public UITest { | 541 class AutomationProxyTest4 : public UITest { |
543 protected: | 542 protected: |
544 AutomationProxyTest4() : UITest() { | 543 AutomationProxyTest4() : UITest() { |
545 dom_automation_enabled_ = true; | 544 dom_automation_enabled_ = true; |
546 } | 545 } |
547 }; | 546 }; |
548 | 547 |
549 std::wstring CreateJSString(const std::wstring& value) { | 548 std::wstring CreateJSString(const std::wstring& value) { |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 | 1580 |
1582 std::string data; | 1581 std::string data; |
1583 ASSERT_NO_FATAL_FAILURE(AssertReadPNG(snapshot_path_, &data)); | 1582 ASSERT_NO_FATAL_FAILURE(AssertReadPNG(snapshot_path_, &data)); |
1584 EXPECT_STREQ(kReferenceMd5, base::MD5String(data).c_str()); | 1583 EXPECT_STREQ(kReferenceMd5, base::MD5String(data).c_str()); |
1585 if (CommandLine::ForCurrentProcess()->HasSwitch("dump-test-image")) { | 1584 if (CommandLine::ForCurrentProcess()->HasSwitch("dump-test-image")) { |
1586 FilePath path(FILE_PATH_LITERAL("snapshot.png")); | 1585 FilePath path(FILE_PATH_LITERAL("snapshot.png")); |
1587 EXPECT_EQ(file_util::WriteFile(path, &data[0], data.length()), | 1586 EXPECT_EQ(file_util::WriteFile(path, &data[0], data.length()), |
1588 static_cast<int>(data.length())); | 1587 static_cast<int>(data.length())); |
1589 } | 1588 } |
1590 } | 1589 } |
OLD | NEW |