| 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 "base/memory/ref_counted.h" | 5 #include "base/memory/ref_counted.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "chrome/common/chrome_paths.h" | 7 #include "chrome/common/chrome_paths.h" |
| 8 #include "chrome/test/automation/automation_proxy.h" | 8 #include "chrome/test/automation/automation_proxy.h" |
| 9 #include "chrome/test/automation/browser_proxy.h" | 9 #include "chrome/test/automation/browser_proxy.h" |
| 10 #include "chrome/test/automation/extension_proxy.h" | 10 #include "chrome/test/automation/extension_proxy.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 FAIL() << "Could not send WaitForExtensionTestResult message"; | 144 FAIL() << "Could not send WaitForExtensionTestResult message"; |
| 145 ASSERT_TRUE(result) << "Extension test message: " << message; | 145 ASSERT_TRUE(result) << "Extension test message: " << message; |
| 146 ASSERT_TRUE(display_tab->GetTabTitle(&title_wstring)); | 146 ASSERT_TRUE(display_tab->GetTabTitle(&title_wstring)); |
| 147 ASSERT_STREQ(L"1", title_wstring.c_str()); | 147 ASSERT_STREQ(L"1", title_wstring.c_str()); |
| 148 | 148 |
| 149 // Do not forget to stop the server. | 149 // Do not forget to stop the server. |
| 150 ASSERT_TRUE(http_server.Stop()); | 150 ASSERT_TRUE(http_server.Stop()); |
| 151 } | 151 } |
| 152 | 152 |
| 153 // Flaky, http://crbug.com/59441. | 153 // Flaky, http://crbug.com/59441. |
| 154 TEST_F(ExtensionProxyUITest, FLAKY_MoveBrowserAction) { | 154 TEST_F(ExtensionProxyUITest, DISABLED_MoveBrowserAction) { |
| 155 int action_index; | 155 int action_index; |
| 156 | 156 |
| 157 scoped_refptr<ExtensionProxy> rename_tab_extension = | 157 scoped_refptr<ExtensionProxy> rename_tab_extension = |
| 158 InstallRenameTabExtension(); | 158 InstallRenameTabExtension(); |
| 159 ASSERT_TRUE(rename_tab_extension.get()); | 159 ASSERT_TRUE(rename_tab_extension.get()); |
| 160 | 160 |
| 161 ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&action_index)); | 161 ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&action_index)); |
| 162 ASSERT_EQ(0, action_index); | 162 ASSERT_EQ(0, action_index); |
| 163 ASSERT_TRUE(rename_tab_extension->GetBrowserActionIndex(&action_index)); | 163 ASSERT_TRUE(rename_tab_extension->GetBrowserActionIndex(&action_index)); |
| 164 ASSERT_EQ(1, action_index); | 164 ASSERT_EQ(1, action_index); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 175 ASSERT_EQ(0, action_index); | 175 ASSERT_EQ(0, action_index); |
| 176 ASSERT_TRUE(rename_tab_extension->GetBrowserActionIndex(&action_index)); | 176 ASSERT_TRUE(rename_tab_extension->GetBrowserActionIndex(&action_index)); |
| 177 ASSERT_EQ(1, action_index); | 177 ASSERT_EQ(1, action_index); |
| 178 | 178 |
| 179 // Try moving browser action to invalid index. | 179 // Try moving browser action to invalid index. |
| 180 ASSERT_FALSE(simple_extension_->MoveBrowserAction(-1)); | 180 ASSERT_FALSE(simple_extension_->MoveBrowserAction(-1)); |
| 181 ASSERT_FALSE(simple_extension_->MoveBrowserAction(2)); | 181 ASSERT_FALSE(simple_extension_->MoveBrowserAction(2)); |
| 182 } | 182 } |
| 183 | 183 |
| 184 // Flaky, http://crbug.com/59440. | 184 // Flaky, http://crbug.com/59440. |
| 185 TEST_F(ExtensionProxyUITest, FLAKY_GetProperty) { | 185 TEST_F(ExtensionProxyUITest, DISABLED_GetProperty) { |
| 186 std::string id; | 186 std::string id; |
| 187 ASSERT_TRUE(simple_extension_->GetId(&id)); | 187 ASSERT_TRUE(simple_extension_->GetId(&id)); |
| 188 ASSERT_EQ("aiglobglfckejlcpcbdokbkbjeemfhno", id); | 188 ASSERT_EQ("aiglobglfckejlcpcbdokbkbjeemfhno", id); |
| 189 | 189 |
| 190 std::string name; | 190 std::string name; |
| 191 ASSERT_TRUE(simple_extension_->GetName(&name)); | 191 ASSERT_TRUE(simple_extension_->GetName(&name)); |
| 192 ASSERT_EQ("Browser Action", name); | 192 ASSERT_EQ("Browser Action", name); |
| 193 | 193 |
| 194 std::string version; | 194 std::string version; |
| 195 ASSERT_TRUE(simple_extension_->GetVersion(&version)); | 195 ASSERT_TRUE(simple_extension_->GetVersion(&version)); |
| 196 ASSERT_EQ("0.1.1", version); | 196 ASSERT_EQ("0.1.1", version); |
| 197 | 197 |
| 198 int browser_action_index; | 198 int browser_action_index; |
| 199 ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&browser_action_index)); | 199 ASSERT_TRUE(simple_extension_->GetBrowserActionIndex(&browser_action_index)); |
| 200 ASSERT_EQ(0, browser_action_index); | 200 ASSERT_EQ(0, browser_action_index); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace | 203 } // namespace |
| OLD | NEW |