OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/no_windows2000_unittest.h" | 6 #include "base/no_windows2000_unittest.h" |
7 #include "base/win_util.h" | 7 #include "base/win_util.h" |
8 #include "chrome/common/chrome_switches.h" | 8 #include "chrome/common/chrome_switches.h" |
9 #include "chrome/test/automation/browser_proxy.h" | 9 #include "chrome/test/automation/browser_proxy.h" |
10 #include "chrome/test/automation/tab_proxy.h" | 10 #include "chrome/test/automation/tab_proxy.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 // This test also does not work in single process. See http://b/1214920 | 31 // This test also does not work in single process. See http://b/1214920 |
32 // Disabled, see http://crbug.com/4655 | 32 // Disabled, see http://crbug.com/4655 |
33 TEST_F(InspectorControllerTest, DISABLED_InspectElement) { | 33 TEST_F(InspectorControllerTest, DISABLED_InspectElement) { |
34 if (IsTestCaseDisabled()) | 34 if (IsTestCaseDisabled()) |
35 return; | 35 return; |
36 | 36 |
37 if (CommandLine().HasSwitch(switches::kSingleProcess)) | 37 if (CommandLine().HasSwitch(switches::kSingleProcess)) |
38 return; | 38 return; |
39 | 39 |
40 TestServer server(L"chrome/test/data"); | 40 scoped_refptr<HTTPTestServer> server = |
| 41 HTTPTestServer::CreateServer(L"chrome/test/data"); |
| 42 ASSERT_TRUE(NULL != server.get()); |
| 43 |
41 ::scoped_ptr<TabProxy> tab(GetActiveTabProxy()); | 44 ::scoped_ptr<TabProxy> tab(GetActiveTabProxy()); |
42 // We don't track resources until we've opened the inspector. | 45 // We don't track resources until we've opened the inspector. |
43 NavigateTab(tab.get(), server.TestServerPageW(L"files/inspector/test1.html")); | 46 NavigateTab(tab.get(), server->TestServerPageW( |
| 47 L"files/inspector/test1.html")); |
44 tab->InspectElement(0, 0); | 48 tab->InspectElement(0, 0); |
45 NavigateTab(tab.get(), server.TestServerPageW(L"files/inspector/test1.html")); | 49 NavigateTab(tab.get(), server->TestServerPageW( |
| 50 L"files/inspector/test1.html")); |
46 EXPECT_EQ(1, tab->InspectElement(0, 0)); | 51 EXPECT_EQ(1, tab->InspectElement(0, 0)); |
47 NavigateTab(tab.get(), server.TestServerPageW(L"files/inspector/test2.html")); | 52 NavigateTab(tab.get(), server->TestServerPageW( |
| 53 L"files/inspector/test2.html")); |
48 EXPECT_EQ(2, tab->InspectElement(0, 0)); | 54 EXPECT_EQ(2, tab->InspectElement(0, 0)); |
49 } | 55 } |
50 | 56 |
OLD | NEW |