OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/json/json_reader.h" | 6 #include "base/json/json_reader.h" |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/automation/extension_automation_constants.h" | 9 #include "chrome/browser/automation/extension_automation_constants.h" |
10 #include "chrome/browser/extensions/extension_tabs_module_constants.h" | 10 #include "chrome/browser/extensions/extension_tabs_module_constants.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 // universal forwarding. | 116 // universal forwarding. |
117 functions_enabled_.clear(); | 117 functions_enabled_.clear(); |
118 functions_enabled_.push_back("tabs.remove"); | 118 functions_enabled_.push_back("tabs.remove"); |
119 ExtensionUITest::SetUp(); | 119 ExtensionUITest::SetUp(); |
120 } | 120 } |
121 | 121 |
122 private: | 122 private: |
123 DISALLOW_COPY_AND_ASSIGN(ExtensionTestSimpleApiCall); | 123 DISALLOW_COPY_AND_ASSIGN(ExtensionTestSimpleApiCall); |
124 }; | 124 }; |
125 | 125 |
126 TEST_F(ExtensionTestSimpleApiCall, RunTest) { | 126 TEST_F(ExtensionTestSimpleApiCall, FLAKY_RunTest) { |
cbentzel
2010/05/19 21:56:23
Add a bug for this as and add a link to it in a co
| |
127 namespace keys = extension_automation_constants; | 127 namespace keys = extension_automation_constants; |
128 | 128 |
129 ASSERT_THAT(mock_, testing::NotNull()); | 129 ASSERT_THAT(mock_, testing::NotNull()); |
130 EXPECT_CALL(*mock_, OnDidNavigate(_, _)).Times(1); | 130 EXPECT_CALL(*mock_, OnDidNavigate(_, _)).Times(1); |
131 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) | 131 EXPECT_CALL(*mock_, OnNavigationStateChanged(_, _, _)) |
132 .Times(testing::AnyNumber()); | 132 .Times(testing::AnyNumber()); |
133 | 133 |
134 std::string message_received; | 134 std::string message_received; |
135 EXPECT_CALL(*mock_, OnForwardMessageToExternalHost( | 135 EXPECT_CALL(*mock_, OnForwardMessageToExternalHost( |
136 _, _, keys::kAutomationOrigin, keys::kAutomationRequestTarget)) | 136 _, _, keys::kAutomationOrigin, keys::kAutomationRequestTarget)) |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 ASSERT_EQ(arraysize(events_), event_count_.size()); | 480 ASSERT_EQ(arraysize(events_), event_count_.size()); |
481 for (std::map<std::string, int>::iterator i = event_count_.begin(); | 481 for (std::map<std::string, int>::iterator i = event_count_.begin(); |
482 i != event_count_.end(); ++i) { | 482 i != event_count_.end(); ++i) { |
483 const std::pair<std::string, int>& value = *i; | 483 const std::pair<std::string, int>& value = *i; |
484 EXPECT_EQ(1, value.second); | 484 EXPECT_EQ(1, value.second); |
485 } | 485 } |
486 } | 486 } |
487 #endif // defined(OS_WIN) | 487 #endif // defined(OS_WIN) |
488 | 488 |
489 } // namespace | 489 } // namespace |
OLD | NEW |