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/gfx/rect.h" | 6 #include "base/gfx/rect.h" |
7 #include "base/json_reader.h" | 7 #include "base/json_reader.h" |
8 #include "base/json_writer.h" | 8 #include "base/json_writer.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/automation/extension_automation_constants.h" | 10 #include "chrome/browser/automation/extension_automation_constants.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 automation()->SetEnableExtensionAutomation(true); | 45 automation()->SetEnableExtensionAutomation(true); |
46 } | 46 } |
47 | 47 |
48 void TearDown() { | 48 void TearDown() { |
49 automation()->SetEnableExtensionAutomation(false); | 49 automation()->SetEnableExtensionAutomation(false); |
50 ParentTestType::TearDown(); | 50 ParentTestType::TearDown(); |
51 } | 51 } |
52 | 52 |
53 void TestWithURL(const GURL& url) { | 53 void TestWithURL(const GURL& url) { |
54 HWND external_tab_container = NULL; | 54 HWND external_tab_container = NULL; |
55 scoped_ptr<TabProxy> tab(automation()->CreateExternalTab(NULL, gfx::Rect(), | 55 scoped_refptr<TabProxy> tab(automation()->CreateExternalTab(NULL, gfx::Rect(
), |
56 WS_POPUP, false, &external_tab_container)); | 56 WS_POPUP, false, &external_tab_container)); |
57 ASSERT_TRUE(tab != NULL); | 57 ASSERT_TRUE(tab != NULL); |
58 ASSERT_NE(FALSE, ::IsWindow(external_tab_container)); | 58 ASSERT_NE(FALSE, ::IsWindow(external_tab_container)); |
59 DoAdditionalPreNavigateSetup(tab.get()); | 59 DoAdditionalPreNavigateSetup(tab.get()); |
60 | 60 |
61 // We explicitly do not make this a toolstrip in the extension manifest, | 61 // We explicitly do not make this a toolstrip in the extension manifest, |
62 // so that the test can control when it gets loaded, and so that we test | 62 // so that the test can control when it gets loaded, and so that we test |
63 // the intended behavior that tabs should be able to show extension pages | 63 // the intended behavior that tabs should be able to show extension pages |
64 // (useful for development etc.) | 64 // (useful for development etc.) |
65 tab->NavigateInExternalTab(url); | 65 tab->NavigateInExternalTab(url); |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 RoundtripAutomationProxy* proxy = | 273 RoundtripAutomationProxy* proxy = |
274 static_cast<RoundtripAutomationProxy*>(automation()); | 274 static_cast<RoundtripAutomationProxy*>(automation()); |
275 | 275 |
276 // Validation is done in the RoundtripAutomationProxy, so we just check | 276 // Validation is done in the RoundtripAutomationProxy, so we just check |
277 // something basic here. | 277 // something basic here. |
278 EXPECT_EQ(proxy->messages_received(), 2); | 278 EXPECT_EQ(proxy->messages_received(), 2); |
279 } | 279 } |
280 #endif // defined(OS_WIN) | 280 #endif // defined(OS_WIN) |
281 | 281 |
282 } // namespace | 282 } // namespace |
OLD | NEW |