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 scoped_refptr<HTTPTestServer> server = | 40 TestServer server(L"chrome/test/data"); |
41 HTTPTestServer::CreateServer(L"chrome/test/data"); | |
42 ASSERT_TRUE(NULL != server.get()); | |
43 | |
44 ::scoped_ptr<TabProxy> tab(GetActiveTabProxy()); | 41 ::scoped_ptr<TabProxy> tab(GetActiveTabProxy()); |
45 // We don't track resources until we've opened the inspector. | 42 // We don't track resources until we've opened the inspector. |
46 NavigateTab(tab.get(), server->TestServerPageW( | 43 NavigateTab(tab.get(), server.TestServerPageW(L"files/inspector/test1.html")); |
47 L"files/inspector/test1.html")); | |
48 tab->InspectElement(0, 0); | 44 tab->InspectElement(0, 0); |
49 NavigateTab(tab.get(), server->TestServerPageW( | 45 NavigateTab(tab.get(), server.TestServerPageW(L"files/inspector/test1.html")); |
50 L"files/inspector/test1.html")); | |
51 EXPECT_EQ(1, tab->InspectElement(0, 0)); | 46 EXPECT_EQ(1, tab->InspectElement(0, 0)); |
52 NavigateTab(tab.get(), server->TestServerPageW( | 47 NavigateTab(tab.get(), server.TestServerPageW(L"files/inspector/test2.html")); |
53 L"files/inspector/test2.html")); | |
54 EXPECT_EQ(2, tab->InspectElement(0, 0)); | 48 EXPECT_EQ(2, tab->InspectElement(0, 0)); |
55 } | 49 } |
56 | 50 |
OLD | NEW |